Add OnActorKill & OnEnemyDefeat hooks (#3112)

* Add OnActorKill & OnEnemyDefeat hooks

* Remove commented out code

* Re-run build

* Add missing include statements
This commit is contained in:
Pepe20129 2023-09-10 19:23:43 +02:00 committed by GitHub
parent bba0a54dbf
commit 5cf0eeef52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 343 additions and 128 deletions

View File

@ -153,6 +153,8 @@ public:
DEFINE_HOOK(OnOcarinaSongAction, void());
DEFINE_HOOK(OnActorInit, void(void* actor));
DEFINE_HOOK(OnActorUpdate, void(void* actor));
DEFINE_HOOK(OnActorKill, void(void* actor));
DEFINE_HOOK(OnEnemyDefeat, void(void* actor));
DEFINE_HOOK(OnPlayerBonk, void());
DEFINE_HOOK(OnPlayDestroy, void());
DEFINE_HOOK(OnPlayDrawEnd, void());

View File

@ -50,6 +50,14 @@ void GameInteractor_ExecuteOnActorUpdate(void* actor) {
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnActorUpdate>(actor);
}
void GameInteractor_ExecuteOnActorKill(void* actor) {
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnActorKill>(actor);
}
void GameInteractor_ExecuteOnEnemyDefeat(void* actor) {
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnEnemyDefeat>(actor);
}
void GameInteractor_ExecuteOnPlayerBonk() {
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnPlayerBonk>();
}

View File

@ -16,6 +16,8 @@ void GameInteractor_ExecuteOnPlayerUpdate();
void GameInteractor_ExecuteOnOcarinaSongAction();
void GameInteractor_ExecuteOnActorInit(void* actor);
void GameInteractor_ExecuteOnActorUpdate(void* actor);
void GameInteractor_ExecuteOnActorKill(void* actor);
void GameInteractor_ExecuteOnEnemyDefeat(void* actor);
void GameInteractor_ExecuteOnPlayerBonk();
void GameInteractor_ExecuteOnOcarinaSongAction();
void GameInteractor_ExecuteOnPlayDestroy();

View File

@ -87,7 +87,7 @@ typedef enum {
COUNT_ENEMIES_DEFEATED_PARASITIC_TENTACLE, // EN_BA
COUNT_ENEMIES_DEFEATED_PEAHAT, // EN_PEEHAT
COUNT_ENEMIES_DEFEATED_PEAHAT_LARVA, // EN_PEEHAT
COUNT_ENEMIES_DEFEATED_POE, // EN_POH
COUNT_ENEMIES_DEFEATED_POE, // EN_POH & EN_PO_FIELD
COUNT_ENEMIES_DEFEATED_POE_BIG, // EN_PO_FIELD
COUNT_ENEMIES_DEFEATED_POE_COMPOSER, // EN_POH
COUNT_ENEMIES_DEFEATED_POE_SISTERS, // EN_PO_SISTERS

View File

@ -9,6 +9,19 @@
#include "soh/Enhancements/cosmetics/authenticGfxPatches.h"
#include "soh/Enhancements/nametag.h"
#include "src/overlays/actors/ovl_En_Bb/z_en_bb.h"
#include "src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.h"
#include "src/overlays/actors/ovl_En_Mb/z_en_mb.h"
#include "src/overlays/actors/ovl_En_Tite/z_en_tite.h"
#include "src/overlays/actors/ovl_En_Zf/z_en_zf.h"
#include "src/overlays/actors/ovl_En_Wf/z_en_wf.h"
#include "src/overlays/actors/ovl_En_Reeba/z_en_reeba.h"
#include "src/overlays/actors/ovl_En_Peehat/z_en_peehat.h"
#include "src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h"
#include "src/overlays/actors/ovl_En_Poh/z_en_poh.h"
#include "src/overlays/actors/ovl_En_Tp/z_en_tp.h"
#include "src/overlays/actors/ovl_En_Firefly/z_en_firefly.h"
extern "C" {
#include <z64.h>
#include "macros.h"
@ -601,6 +614,197 @@ void RegisterMirrorModeHandler() {
});
}
//this map is used for enemies that can be uniquely identified by their id
//and that are always counted
//enemies that can't be uniquely identified by their id
//or only sometimes count (like ACTOR_EN_TP)
//have to be manually handled in RegisterEnemyDefeatCounts
static std::unordered_map<u16, u16> uniqueEnemyIdToStatCount = {
{ ACTOR_EN_ANUBICE, COUNT_ENEMIES_DEFEATED_ANUBIS },
{ ACTOR_EN_AM, COUNT_ENEMIES_DEFEATED_ARMOS },
{ ACTOR_EN_CLEAR_TAG, COUNT_ENEMIES_DEFEATED_ARWING },
{ ACTOR_EN_VALI, COUNT_ENEMIES_DEFEATED_BARI },
{ ACTOR_EN_VM, COUNT_ENEMIES_DEFEATED_BEAMOS },
{ ACTOR_EN_BIGOKUTA, COUNT_ENEMIES_DEFEATED_BIG_OCTO },
{ ACTOR_EN_BILI, COUNT_ENEMIES_DEFEATED_BIRI },
{ ACTOR_EN_DNS, COUNT_ENEMIES_DEFEATED_BUSINESS_SCRUB },
{ ACTOR_EN_TORCH, COUNT_ENEMIES_DEFEATED_DARK_LINK },
{ ACTOR_EN_DH, COUNT_ENEMIES_DEFEATED_DEAD_HAND },
{ ACTOR_EN_HINTNUTS, COUNT_ENEMIES_DEFEATED_DEKU_SCRUB },
{ ACTOR_EN_DODONGO, COUNT_ENEMIES_DEFEATED_DODONGO },
{ ACTOR_EN_DODOJR, COUNT_ENEMIES_DEFEATED_DODONGO_BABY },
{ ACTOR_DOOR_KILLER, COUNT_ENEMIES_DEFEATED_DOOR_TRAP },
{ ACTOR_EN_FD, COUNT_ENEMIES_DEFEATED_FLARE_DANCER },
{ ACTOR_EN_FLOORMAS, COUNT_ENEMIES_DEFEATED_FLOORMASTER },
{ ACTOR_EN_TUBO_TRAP, COUNT_ENEMIES_DEFEATED_FLYING_POT },
{ ACTOR_EN_YUKABYUN, COUNT_ENEMIES_DEFEATED_FLOOR_TILE },
{ ACTOR_EN_FZ, COUNT_ENEMIES_DEFEATED_FREEZARD },
{ ACTOR_EN_GELDB, COUNT_ENEMIES_DEFEATED_GERUDO_THIEF },
{ ACTOR_EN_GOMA, COUNT_ENEMIES_DEFEATED_GOHMA_LARVA },
{ ACTOR_EN_CROW, COUNT_ENEMIES_DEFEATED_GUAY },
{ ACTOR_EN_RR, COUNT_ENEMIES_DEFEATED_LIKE_LIKE },
{ ACTOR_EN_DEKUNUTS, COUNT_ENEMIES_DEFEATED_MAD_SCRUB },
{ ACTOR_EN_OKUTA, COUNT_ENEMIES_DEFEATED_OCTOROK },
{ ACTOR_EN_BA, COUNT_ENEMIES_DEFEATED_PARASITIC_TENTACLE },
{ ACTOR_EN_PO_SISTERS, COUNT_ENEMIES_DEFEATED_POE_SISTERS },
{ ACTOR_EN_BUBBLE, COUNT_ENEMIES_DEFEATED_SHABOM },
{ ACTOR_EN_SB, COUNT_ENEMIES_DEFEATED_SHELLBLADE },
{ ACTOR_EN_SKJ, COUNT_ENEMIES_DEFEATED_SKULL_KID },
{ ACTOR_EN_NY, COUNT_ENEMIES_DEFEATED_SPIKE },
{ ACTOR_EN_SKB, COUNT_ENEMIES_DEFEATED_STALCHILD },
{ ACTOR_EN_TEST, COUNT_ENEMIES_DEFEATED_STALFOS },
{ ACTOR_EN_WEIYER, COUNT_ENEMIES_DEFEATED_STINGER },
{ ACTOR_EN_BW, COUNT_ENEMIES_DEFEATED_TORCH_SLUG },
{ ACTOR_EN_WALLMAS, COUNT_ENEMIES_DEFEATED_WALLMASTER },
{ ACTOR_EN_KAREBABA, COUNT_ENEMIES_DEFEATED_WITHERED_DEKU_BABA },
};
void RegisterEnemyDefeatCounts() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnEnemyDefeat>([](void* refActor) {
Actor* actor = (Actor*)refActor;
if (uniqueEnemyIdToStatCount.contains(actor->id)) {
gSaveContext.sohStats.count[uniqueEnemyIdToStatCount[actor->id]]++;
} else {
switch (actor->id) {
case ACTOR_EN_BB:
if (actor->params == ENBB_GREEN || actor->params == ENBB_GREEN_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_GREEN]++;
} else if (actor->params == ENBB_BLUE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_BLUE]++;
} else if (actor->params == ENBB_WHITE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_WHITE]++;
} else if (actor->params == ENBB_RED) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_RED]++;
}
break;
case ACTOR_EN_DEKUBABA:
if (actor->params == DEKUBABA_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_BABA_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_BABA]++;
}
break;
case ACTOR_EN_ZF:
if (actor->params == ENZF_TYPE_DINOLFOS) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DINOLFOS]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LIZALFOS]++;
}
break;
case ACTOR_EN_RD:
if (actor->params >= -1) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_REDEAD]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GIBDO]++;
}
break;
case ACTOR_EN_IK:
if (actor->params == 0) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_IRON_KNUCKLE_NABOORU]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_IRON_KNUCKLE]++;
}
break;
case ACTOR_EN_FIREFLY:
if (actor->params == KEESE_NORMAL_FLY || actor->params == KEESE_NORMAL_PERCH) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_KEESE]++;
} else if (actor->params == KEESE_FIRE_FLY || actor->params == KEESE_FIRE_PERCH) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_KEESE_FIRE]++;
} else if (actor->params == KEESE_ICE_FLY) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_KEESE_ICE]++;
}
break;
case ACTOR_EN_REEBA:
{
EnReeba* reeba = (EnReeba*)actor;
if (reeba->isBig) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LEEVER_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LEEVER]++;
}
}
break;
case ACTOR_EN_MB:
if (actor->params == 0) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_MOBLIN_CLUB]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_MOBLIN]++;
}
break;
case ACTOR_EN_PEEHAT:
if (actor->params == PEAHAT_TYPE_LARVA) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_PEAHAT_LARVA]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_PEAHAT]++;
}
break;
case ACTOR_EN_POH:
if (actor->params == EN_POH_FLAT || actor->params == EN_POH_SHARP) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_COMPOSER]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE]++;
}
break;
case ACTOR_EN_PO_FIELD:
if (actor->params == EN_PO_FIELD_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE]++;
}
break;
case ACTOR_EN_ST:
if (actor->params == 1) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLTULA_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLTULA]++;
}
break;
case ACTOR_EN_SW:
if (((actor->params & 0xE000) >> 0xD) != 0) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLTULA_GOLD]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLWALLTULA]++;
}
break;
case ACTOR_EN_TP:
if (actor->params == TAILPASARAN_HEAD) { // Only count the head, otherwise each body segment will increment
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TAILPASARAN]++;
}
break;
case ACTOR_EN_TITE:
if (actor->params == TEKTITE_BLUE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TEKTITE_BLUE]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TEKTITE_RED]++;
}
break;
case ACTOR_EN_WF:
if (actor->params == WOLFOS_WHITE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WOLFOS_WHITE]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WOLFOS]++;
}
break;
}
}
});
}
typedef enum {
ADD_ICE_TRAP,
ADD_BURN_TRAP,
@ -771,6 +975,7 @@ void InitMods() {
RegisterBonkDamage();
RegisterMenuPathFix();
RegisterMirrorModeHandler();
RegisterEnemyDefeatCounts();
RegisterAltTrapTypes();
NameTag_RegisterHooks();
}

View File

@ -1147,6 +1147,7 @@ s32 func_8002D53C(PlayState* play, TitleCardContext* titleCtx) {
}
void Actor_Kill(Actor* actor) {
GameInteractor_ExecuteOnActorKill(actor);
actor->draw = NULL;
actor->update = NULL;
actor->flags &= ~ACTOR_FLAG_TARGETABLE;

View File

@ -10,6 +10,7 @@
#include "objects/object_mizu_objects/object_mizu_objects.h"
#include "objects/object_haka_door/object_haka_door.h"
#include "objects/object_door_killer/object_door_killer.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -270,7 +271,7 @@ void DoorKiller_Die(DoorKiller* this, PlayState* play) {
Flags_SetSwitch(play, switchFlag);
}
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DOOR_TRAP]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
/**

View File

@ -7,6 +7,7 @@
#include "z_en_am.h"
#include "objects/object_am/object_am.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_CAN_PRESS_SWITCH)
@ -884,8 +885,8 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
func_8002836C(play, &dustPos, &zeroVec, &zeroVec, &dustPrimColor, &dustEnvColor, 200, 45, 12);
dustPosScale += 60.0f;
}
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_ARMOS]++;
GameInteractor_ExecuteOnEnemyDefeat(thisx);
Actor_Kill(&this->dyna.actor);
return;

View File

@ -9,6 +9,7 @@
#include "overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h"
#include "overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -314,7 +315,7 @@ void EnAnubice_SetupDie(EnAnubice* this, PlayState* play) {
}
this->actionFunc = EnAnubice_Die;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_ANUBIS]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnAnubice_Die(EnAnubice* this, PlayState* play) {

View File

@ -7,6 +7,7 @@
#include "z_en_ba.h"
#include "objects/object_bxa/object_bxa.h"
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -455,7 +456,7 @@ void EnBa_Update(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.health--;
if (this->actor.colChkInfo.health == 0) {
func_809B75A0(this, play);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_PARASITIC_TENTACLE]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
} else {
func_809B7174(this);
}

View File

@ -7,6 +7,7 @@
#include "z_en_bb.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_Bb/object_Bb.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_PLAY_HIT_SFX)
@ -465,18 +466,7 @@ void EnBb_SetupDeath(EnBb* this, PlayState* play) {
this->action = BB_KILL;
EnBb_SetupAction(this, EnBb_Death);
if (this->actor.params == ENBB_GREEN || this->actor.params == ENBB_GREEN_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_GREEN]++;
}
if (this->actor.params == ENBB_BLUE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_BLUE]++;
}
if (this->actor.params == ENBB_WHITE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_WHITE]++;
}
if (this->actor.params == ENBB_RED) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUBBLE_RED]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnBb_Death(EnBb* this, PlayState* play) {

View File

@ -1,5 +1,6 @@
#include "z_en_bigokuta.h"
#include "objects/object_bigokuta/object_bigokuta.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -648,7 +649,7 @@ void func_809BE26C(EnBigokuta* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_OCTAROCK_BUBLE);
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BIG_OCTO]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
}

View File

@ -6,6 +6,7 @@
#include "z_en_bili.h"
#include "objects/object_bl/object_bl.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE)
@ -233,7 +234,7 @@ void EnBili_SetupDie(EnBili* this) {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actionFunc = EnBili_Die;
this->actor.speedXZ = 0.0f;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BIRI]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
/**

View File

@ -1,5 +1,6 @@
#include "z_en_bubble.h"
#include "objects/object_bubble/object_bubble.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_TARGETABLE
@ -372,7 +373,7 @@ void EnBubble_Pop(EnBubble* this, PlayState* play) {
if (EnBubble_Explosion(this, play) >= 0) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SHABOM]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -7,6 +7,7 @@
#include "z_en_bw.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_bw/object_bw.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -577,7 +578,7 @@ void func_809D00F4(EnBw* this) {
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLEWALK_DEAD);
EnBw_SetupAction(this, func_809D014C);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TORCH_SLUG]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void func_809D014C(EnBw* this, PlayState* play) {

View File

@ -3,6 +3,7 @@
#include <string.h>
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -374,7 +375,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
if ((s8)this->actor.colChkInfo.health <= 0) {
this->state = CLEAR_TAG_STATE_CRASHING;
this->actor.velocity.y = 0.0f;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_ARWING]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
goto state_crashing;
}
}

View File

@ -1,5 +1,6 @@
#include "z_en_crow.h"
#include "objects/object_crow/object_crow.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE)
@ -191,7 +192,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
void EnCrow_SetupDie(EnCrow* this) {
this->actor.colorFilterTimer = 0;
this->actionFunc = EnCrow_Die;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GUAY]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnCrow_SetupTurnAway(EnCrow* this) {

View File

@ -2,6 +2,7 @@
#include "objects/object_dekubaba/object_dekubaba.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -409,11 +410,7 @@ void EnDekubaba_SetupPrunedSomersault(EnDekubaba* this) {
this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED;
this->actionFunc = EnDekubaba_PrunedSomersault;
if (this->actor.params == DEKUBABA_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_BABA_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_BABA]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnDekubaba_SetupShrinkDie(EnDekubaba* this) {
@ -422,11 +419,7 @@ void EnDekubaba_SetupShrinkDie(EnDekubaba* this) {
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = EnDekubaba_ShrinkDie;
if (this->actor.params == DEKUBABA_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_BABA_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_BABA]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnDekubaba_SetupStunnedVertical(EnDekubaba* this) {

View File

@ -7,6 +7,7 @@
#include "z_en_dekunuts.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_dekunuts/object_dekunuts.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -235,7 +236,7 @@ void EnDekunuts_SetupDie(EnDekunuts* this) {
this->actionFunc = EnDekunuts_Die;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DEAD);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_MAD_SCRUB]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnDekunuts_Wait(EnDekunuts* this, PlayState* play) {

View File

@ -1,5 +1,6 @@
#include "z_en_dh.h"
#include "objects/object_dh/object_dh.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)
@ -442,7 +443,7 @@ void EnDh_SetupDeath(EnDh* this) {
this->actor.params = ENDH_DEATH;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_DEAD);
EnDh_SetupAction(this, EnDh_Death);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEAD_HAND]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnDh_Death(EnDh* this, PlayState* play) {

View File

@ -7,6 +7,7 @@
#include "z_en_dns.h"
#include "objects/object_shopnuts/object_shopnuts.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
@ -522,7 +523,7 @@ void EnDns_Burrow(EnDns* this, PlayState* play) {
}
}
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BUSINESS_SCRUB]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -7,6 +7,7 @@
#include "z_en_dodojr.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "objects/object_dodojr/object_dodojr.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -185,7 +186,7 @@ void func_809F6A20(EnDodojr* this) {
this->unk_1FC = 3;
this->actor.velocity.y = 10.0f;
}
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DODONGO_BABY]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void func_809F6AC4(EnDodojr* this) {

View File

@ -2,6 +2,7 @@
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
#include "objects/object_dodongo/object_dodongo.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -668,7 +669,7 @@ void EnDodongo_SetupDeath(EnDodongo* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actor.speedXZ = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_Death);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DODONGO]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnDodongo_Death(EnDodongo* this, PlayState* play) {

View File

@ -1,5 +1,6 @@
#include "z_en_eiyer.h"
#include "objects/object_ei/object_ei.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -613,7 +614,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
Enemy_StartFinishingBlow(play, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD);
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STINGER]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
// If underground, one hit kill

View File

@ -8,6 +8,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_fw/object_fw.h"
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_HOOKSHOT_DRAGS)
@ -648,7 +649,7 @@ void EnFd_WaitForCore(EnFd* this, PlayState* play) {
} else if (this->actor.params & FLG_COREDEAD) {
this->actor.params = 0;
this->spinTimer = 30;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLARE_DANCER]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -7,6 +7,7 @@
#include "z_en_firefly.h"
#include "objects/object_firefly/object_firefly.h"
#include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE)
@ -225,15 +226,8 @@ void EnFirefly_SetupDie(EnFirefly* this) {
this->timer = 15;
this->actor.speedXZ = 0.0f;
this->actionFunc = EnFirefly_Die;
if (this->actor.params == KEESE_NORMAL_FLY || this->actor.params == KEESE_NORMAL_PERCH) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_KEESE]++;
}
if (this->actor.params == KEESE_FIRE_FLY || this->actor.params == KEESE_FIRE_PERCH) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_KEESE_FIRE]++;
}
if (this->actor.params == KEESE_ICE_FLY) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_KEESE_ICE]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnFirefly_SetupRebound(EnFirefly* this) {

View File

@ -6,6 +6,7 @@
#include "z_en_floormas.h"
#include "objects/object_wallmaster/object_wallmaster.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)
@ -441,7 +442,7 @@ void EnFloormas_Die(EnFloormas* this, PlayState* play) {
// Die
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x90);
EnFloormas_SetupSmShrink(this, play);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLOORMASTER]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -1,6 +1,7 @@
#include "z_en_fz.h"
#include "objects/object_fz/object_fz.h"
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)
@ -363,7 +364,7 @@ void EnFz_ApplyDamage(EnFz* this, PlayState* play) {
vec.z = this->actor.world.pos.z;
EnFz_Damaged(this, play, &vec, 30, 10.0f);
EnFz_SetupDespawn(this, play);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FREEZARD]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
} else {

View File

@ -7,6 +7,7 @@
#include "z_en_geldb.h"
#include "objects/object_geldb/object_geldb.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -1321,7 +1322,7 @@ void EnGeldB_SetupDefeated(EnGeldB* this) {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DEAD);
EnGeldB_SetupAction(this, EnGeldB_Defeated);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GERUDO_THIEF]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnGeldB_Defeated(EnGeldB* this, PlayState* play) {

View File

@ -3,6 +3,7 @@
#include "objects/object_gol/object_gol.h"
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -398,7 +399,7 @@ void EnGoma_SetupDead(EnGoma* this) {
Animation_GetLastFrame(&gObjectGolDeadTwitchingAnim), ANIMMODE_LOOP, -2.0f);
this->actionFunc = EnGoma_Dead;
this->actionTimer = 3;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GOHMA_LARVA]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnGoma_Dead(EnGoma* this, PlayState* play) {
@ -669,7 +670,7 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
EnGoma_SpawnHatchDebris(this, play);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GOHMA_LARVA]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
}

View File

@ -6,6 +6,7 @@
#include "z_en_hintnuts.h"
#include "objects/object_hintnuts/object_hintnuts.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -430,7 +431,7 @@ void EnHintnuts_Leave(EnHintnuts* this, PlayState* play) {
Actor_ChangeCategory(play, &play->actorCtx, this->actor.child, ACTORCAT_PROP);
}
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DEKU_SCRUB]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -8,6 +8,7 @@
#include "scenes/dungeons/jyasinboss/jyasinboss_scene.h"
#include "objects/object_ik/object_ik.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -640,7 +641,7 @@ void func_80A7598C(EnIk* this) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DEAD);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_CUTBODY);
EnIk_SetupAction(this, func_80A75A38);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_IRON_KNUCKLE]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void func_80A75A38(EnIk* this, PlayState* play) {
@ -1466,7 +1467,7 @@ void func_80A781CC(Actor* thisx, PlayState* play) {
}
Flags_SetEventChkInf(EVENTCHKINF_FINISHED_NABOORU_BATTLE);
func_80A7735C(this, play);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_IRON_KNUCKLE_NABOORU]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -8,6 +8,7 @@
#include "objects/object_dekubaba/object_dekubaba.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -182,7 +183,7 @@ void EnKarebaba_SetupDying(EnKarebaba* this) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKU_JR_DEAD);
this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED;
this->actionFunc = EnKarebaba_Dying;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WITHERED_DEKU_BABA]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnKarebaba_SetupDeadItemDrop(EnKarebaba* this, PlayState* play) {

View File

@ -6,6 +6,7 @@
#include "z_en_mb.h"
#include "objects/object_mb/object_mb.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
/*
* This actor can have three behaviors:
@ -1442,14 +1443,14 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
if (this->actor.params == ENMB_TYPE_CLUB) {
if (this->actor.colChkInfo.health == 0) {
EnMb_SetupClubDead(this);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_MOBLIN_CLUB]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
} else if (this->state != ENMB_STATE_CLUB_KNEELING) {
EnMb_SetupClubDamaged(this);
}
} else {
if (this->actor.colChkInfo.health == 0) {
EnMb_SetupSpearDead(this);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_MOBLIN]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
} else {
EnMb_SetupSpearDamaged(this);
}

View File

@ -1,6 +1,7 @@
#include "z_en_ny.h"
#include "objects/object_ny/object_ny.h"
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -447,7 +448,7 @@ void EnNy_SetupDie(EnNy* this, PlayState* play) {
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NYU_DEAD);
this->actionFunc = EnNy_Die;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SPIKE]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -1,6 +1,7 @@
#include "z_en_okuta.h"
#include "objects/object_okuta/object_okuta.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -257,7 +258,7 @@ void EnOkuta_SetupDie(EnOkuta* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gOctorokDieAnim, -3.0f);
this->timer = 0;
this->actionFunc = EnOkuta_Die;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_OCTOROK]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnOkuta_SetupFreeze(EnOkuta* this) {

View File

@ -2,6 +2,7 @@
#include "objects/object_peehat/object_peehat.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_PLAY_HIT_SFX)
@ -594,7 +595,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
}
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x20);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_PEAHAT_LARVA]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
}
@ -764,7 +765,7 @@ void EnPeehat_StateAttackRecoil(EnPeehat* this, PlayState* play) {
1);
}
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_PEAHAT_LARVA]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
} else {
EnPeehat_Ground_SetStateSeekPlayer(this);
// Is PEAHAT_TYPE_GROUNDED
@ -881,7 +882,7 @@ void EnPeehat_StateExplode(EnPeehat* this, PlayState* play) {
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x40);
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x40);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_PEAHAT]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}

View File

@ -7,6 +7,7 @@
#include "z_en_po_field.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_po_field/object_po_field.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <string.h>
@ -579,11 +580,7 @@ void EnPoField_Death(EnPoField* this, PlayState* play) {
255, 0, 0, 255, 1, 9, 1);
if (this->actionTimer == 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EXTINCT);
if (this->actor.params == EN_PO_FIELD_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
} else if (this->actionTimer == 28) {
EnPoField_SetupSoulIdle(this, play);

View File

@ -8,6 +8,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_po_sisters/object_po_sisters.h"
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_HOOKSHOT_DRAGS | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_ARROW_DRAGGABLE)
@ -1181,7 +1182,7 @@ void func_80ADC10C(EnPoSisters* this, PlayState* play) {
} else {
Enemy_StartFinishingBlow(play, &this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_SISTER_DEAD);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_SISTERS]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
func_80AD95D8(this);
}

View File

@ -7,6 +7,7 @@
#include "z_en_poh.h"
#include "objects/object_poh/object_poh.h"
#include "objects/object_po_composer/object_po_composer.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE)
@ -638,11 +639,7 @@ void func_80ADF15C(EnPoh* this, PlayState* play) {
0, 0, 255, 1, 9, 1);
if (this->unk_198 == 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EXTINCT);
if (this->actor.params == EN_POH_FLAT || this->actor.params == EN_POH_SHARP) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_COMPOSER]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
} else if (this->unk_198 == 28) {
EnPoh_SetupDeath(this, play);

View File

@ -1,5 +1,6 @@
#include "z_en_rd.h"
#include "objects/object_rd/object_rd.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)
@ -648,11 +649,7 @@ void func_80AE3C20(EnRd* this) {
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DEAD);
EnRd_SetupAction(this, func_80AE3C98);
if (this->actor.params >= -1) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_REDEAD]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_GIBDO]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void func_80AE3C98(EnRd* this, PlayState* play) {

View File

@ -9,6 +9,7 @@
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
#include "vt.h"
#include "objects/object_reeba/object_reeba.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_LOCKON)
@ -441,7 +442,7 @@ void func_80AE5A9C(EnReeba* this, PlayState* play) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_DEAD);
Enemy_StartFinishingBlow(play, &this->actor);
this->actionfunc = func_80AE5C38;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LEEVER]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
@ -496,11 +497,7 @@ void func_80AE5C38(EnReeba* this, PlayState* play) {
}
Actor_Kill(&this->actor);
if (this->isBig) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LEEVER_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LEEVER]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
}

View File

@ -7,6 +7,7 @@
#include "z_en_rr.h"
#include "objects/object_rr/object_rr.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <assert.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED | ACTOR_FLAG_DRAGGED_BY_HOOKSHOT)
@ -382,7 +383,7 @@ void EnRr_SetupDeath(EnRr* this) {
this->actionFunc = EnRr_Death;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_LIKE_DEAD);
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LIKE_LIKE]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnRr_SetupStunned(EnRr* this) {

View File

@ -7,6 +7,7 @@
#include "z_en_sb.h"
#include "vt.h"
#include "objects/object_sb/object_sb.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -456,7 +457,7 @@ void EnSb_Update(Actor* thisx, PlayState* play) {
} else {
Item_DropCollectible(play, &this->actor.world.pos, 8);
}
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SHELLBLADE]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
Actor_Kill(&this->actor);
}
} else {

View File

@ -1,6 +1,7 @@
#include "z_en_skb.h"
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
#include "objects/object_skb/object_skb.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -416,7 +417,7 @@ void func_80AFD7B4(EnSkb* this, PlayState* play) {
this->unk_283 |= 4;
EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_STALKID_DEAD, 1, 1, 0x28);
EnSkb_SetupAction(this, func_80AFD880);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STALCHILD]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void func_80AFD880(EnSkb* this, PlayState* play) {

View File

@ -1,6 +1,7 @@
#include "z_en_skj.h"
#include "overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h"
#include "objects/object_skj/object_skj.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA)
@ -735,7 +736,7 @@ void EnSkj_SariasSongKidIdle(EnSkj* this, PlayState* play) {
void EnSkj_SetupDie(EnSkj* this) {
EnSkj_ChangeAnim(this, SKJ_ANIM_DIE);
EnSkj_SetupAction(this, SKJ_ACTION_WAIT_FOR_DEATH_ANIM);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULL_KID]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnSkj_WaitForDeathAnim(EnSkj* this, PlayState* play) {

View File

@ -6,6 +6,7 @@
#include "z_en_st.h"
#include "objects/object_st/object_st.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -465,11 +466,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) {
this->deathTimer = 20;
this->actor.gravity = -1.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALWALL_DEAD);
if (this->actor.params == 1) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLTULA_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLTULA]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
if (flags & 0x1F820) {
// arrow, fire arrow, ice arrow, light arrow,

View File

@ -1,5 +1,6 @@
#include "z_en_sw.h"
#include "objects/object_st/object_st.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -366,7 +367,6 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) {
this->unk_38A = 1;
this->unk_420 *= 4.0f;
this->actionFunc = func_80B0D878;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLTULA_GOLD]++;
} else {
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
this->actor.shape.shadowAlpha = 0xFF;
@ -375,8 +375,9 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) {
this->actor.gravity = -1.0f;
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actionFunc = func_80B0DB00;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_SKULLWALLTULA]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALWALL_DEAD);
return true;

View File

@ -6,6 +6,7 @@
#include "z_en_test.h"
#include "objects/object_sk2/object_sk2.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -1528,7 +1529,7 @@ void func_80862E6C(EnTest* this, PlayState* play) {
}
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STALFOS]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
}
@ -1637,7 +1638,7 @@ void func_808633E8(EnTest* this, PlayState* play) {
}
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STALFOS]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
}
@ -1728,7 +1729,7 @@ void EnTest_Update(Actor* thisx, PlayState* play) {
if ((floorProperty == 5) || (floorProperty == 0xC) ||
func_80041D4C(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 9) {
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STALFOS]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
return;
}
}

View File

@ -9,6 +9,7 @@
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#include "vt.h"
#include "objects/object_tite/object_tite.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -766,11 +767,10 @@ void EnTite_FallApart(EnTite* this, PlayState* play) {
if (BodyBreak_SpawnParts(&this->actor, &this->bodyBreak, play, this->actor.params + 0xB)) {
if (this->actor.params == TEKTITE_BLUE) {
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xE0);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TEKTITE_BLUE]++;
} else {
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x40);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TEKTITE_RED]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
Actor_Kill(&this->actor);
}
}

View File

@ -6,6 +6,7 @@
#include "z_en_torch2.h"
#include "objects/object_torch2/object_torch2.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@ -556,7 +557,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
case ENTORCH2_DEATH:
if (sAlpha - 13 <= 0) {
sAlpha = 0;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DARK_LINK]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
Actor_Kill(&this->actor);
return;
}

View File

@ -6,6 +6,7 @@
#include "z_en_tp.h"
#include "objects/object_tp/object_tp.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS 0
@ -289,9 +290,7 @@ void EnTp_SetupDie(EnTp* this) {
}
this->actionIndex = TAILPASARAN_ACTION_DIE;
EnTp_SetupAction(this, EnTp_Die);
if (this->actor.params == TAILPASARAN_HEAD) { // Only count the head, otherwise each body segment will increment
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_TAILPASARAN]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
/**

View File

@ -8,6 +8,7 @@
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "vt.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -176,7 +177,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_BOMB_DROP_WATER);
EnTuboTrap_DropCollectible(this, play);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLYING_POT]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
return;
}
@ -187,7 +188,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, play);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLYING_POT]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
return;
}
@ -198,7 +199,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, play);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLYING_POT]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
return;
}
@ -210,7 +211,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT);
EnTuboTrap_DropCollectible(this, play);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLYING_POT]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
return;
}
}
@ -220,7 +221,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, play);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLYING_POT]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
return;
}
}

View File

@ -6,6 +6,7 @@
#include "z_en_vali.h"
#include "objects/object_vali/object_vali.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <stdlib.h>
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_IGNORE_QUAKE)
@ -262,7 +263,7 @@ void EnVali_SetupDivideAndDie(EnVali* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actor.draw = NULL;
this->actionFunc = EnVali_DivideAndDie;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BARI]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnVali_SetupStunned(EnVali* this) {

View File

@ -8,6 +8,7 @@
#include "objects/object_vm/object_vm.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -368,7 +369,7 @@ void EnVm_SetupDie(EnVm* this) {
this->actor.speedXZ = Rand_ZeroOne() + 1.0f;
this->actor.world.rot.y = Rand_CenteredFloat(65535.0f);
EnVm_SetupAction(this, EnVm_Die);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_BEAMOS]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnVm_Die(EnVm* this, PlayState* play) {

View File

@ -7,6 +7,7 @@
#include "z_en_wallmas.h"
#include "objects/object_wallmaster/object_wallmaster.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -258,7 +259,7 @@ void EnWallmas_SetupDie(EnWallmas* this, PlayState* play) {
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xC0);
this->actionFunc = EnWallmas_Die;
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WALLMASTER]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) {

View File

@ -6,6 +6,7 @@
#include "z_en_weiyer.h"
#include "objects/object_ei/object_ei.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE)
@ -576,7 +577,7 @@ void func_80B3368C(EnWeiyer* this, PlayState* play) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD);
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
func_80B32724(this);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_STINGER]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
} else {
func_80B325A0(this);
}

View File

@ -8,6 +8,7 @@
#include "vt.h"
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
#include "objects/object_wf/object_wf.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -1197,11 +1198,7 @@ void EnWf_SetupDie(EnWf* this) {
this->actionTimer = this->skelAnime.animLength;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_WOLFOS_DEAD);
EnWf_SetupAction(this, EnWf_Die);
if (this->actor.params == WOLFOS_WHITE) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WOLFOS_WHITE]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_WOLFOS]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnWf_Die(EnWf* this, PlayState* play) {

View File

@ -6,6 +6,7 @@
#include "z_en_yukabyun.h"
#include "objects/object_yukabyun/object_yukabyun.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@ -111,7 +112,7 @@ void EnYukabyun_Break(EnYukabyun* this, PlayState* play) {
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 8.0f, 0, 1300, 300, 15, OBJECT_YUKABYUN, 10,
gFloorTileEnemyFragmentDL);
Actor_Kill(&this->actor);
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_FLOOR_TILE]++;
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnYukabyun_Update(Actor* thisx, PlayState* play) {

View File

@ -6,6 +6,7 @@
#include "z_en_zf.h"
#include "objects/object_zf/object_zf.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@ -1924,11 +1925,7 @@ void EnZf_SetupDie(EnZf* this) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DEAD);
EnZf_SetupAction(this, EnZf_Die);
if (this->actor.params == ENZF_TYPE_DINOLFOS) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_DINOLFOS]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_LIZALFOS]++;
}
GameInteractor_ExecuteOnEnemyDefeat(&this->actor);
}
void EnZf_Die(EnZf* this, PlayState* play) {