diff --git a/docs/STYLE.md b/docs/STYLE.md index 4ac0525dbc..0cf1d051b1 100644 --- a/docs/STYLE.md +++ b/docs/STYLE.md @@ -122,7 +122,7 @@ Floats usually need an `f` on the end to match, or IDO will use doubles. Our flo bar(); ``` -**Exception**: After `Actor_MarkForDeath` or sometimes setting the action function, if it makes sense to do so (this expresses the finality a bit better). +**Exception**: After `Actor_Kill` or sometimes setting the action function, if it makes sense to do so (this expresses the finality a bit better). ## Macros and enums diff --git a/include/functions.h b/include/functions.h index 1439401fc7..0e7808642e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -619,7 +619,7 @@ f32 func_800B64FC(PlayState* play, f32 arg1, Vec3f* arg2, u32* arg3); void* func_800B6584(PlayState* play, s16 id, void* arg2, size_t size); void* func_800B6608(PlayState* play, s16 id); void* func_800B6680(PlayState* play, s16 id); -void Actor_MarkForDeath(Actor* actor); +void Actor_Kill(Actor* actor); void Actor_SetWorldToHome(Actor* actor); void Actor_SetFocus(Actor* actor, f32 height); void Actor_SetWorldRotToShape(Actor* actor); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 01894f2693..52b113c763 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1026,7 +1026,7 @@ void* func_800B6680(PlayState* play, s16 id) { return NULL; } -void Actor_MarkForDeath(Actor* actor) { +void Actor_Kill(Actor* actor) { actor->draw = NULL; actor->update = NULL; actor->flags &= ~ACTOR_FLAG_1; @@ -2346,7 +2346,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) { } } else { if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) { - Actor_MarkForDeath(actor); + Actor_Kill(actor); } else { s32 tmp = (params->unk_08 == 0); @@ -2872,7 +2872,7 @@ void func_800BA6FC(PlayState* play, ActorContext* actorCtx) { while (actor != NULL) { if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) { - Actor_MarkForDeath(actor); + Actor_Kill(actor); } actor = actor->next; @@ -2896,7 +2896,7 @@ void func_800BA798(PlayState* play, ActorContext* actorCtx) { if (!actor->isDrawn) { actor = Actor_Delete(actorCtx, actor, play); } else { - Actor_MarkForDeath(actor); + Actor_Kill(actor); Actor_Destroy(actor, play); actor = actor->next; } @@ -2925,7 +2925,7 @@ void func_800BA8B8(PlayState* play, ActorContext* actorCtx) { if (!actor->isDrawn) { actor = Actor_Delete(actorCtx, actor, play); } else { - Actor_MarkForDeath(actor); + Actor_Kill(actor); Actor_Destroy(actor, play); actor = actor->next; } diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index d6ab737c7b..a07e31e2fd 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -86,7 +86,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { this->collectibleFlag = 0; this->actor.params = ITEM00_RECOVERY_HEART; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -358,7 +358,7 @@ void func_800A640C(EnItem00* this, PlayState* play) { if (this->unk152 == 0) { if ((this->actor.params != ITEM00_SMALL_KEY) && (this->actor.params != ITEM00_HEART_PIECE) && (this->actor.params != ITEM00_HEART_CONTAINER)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -464,7 +464,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) { } if (this->unk152 == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -510,7 +510,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D); if (this->actor.floorHeight <= BGCHECK_Y_MIN) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -659,7 +659,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { case ITEM00_COMPASS: if (Actor_HasParent(&this->actor, play)) { Flags_SetCollectible(play, this->collectibleFlag); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; @@ -672,7 +672,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { } else if (getItemId != GI_NONE) { if (Actor_HasParent(&this->actor, play)) { Flags_SetCollectible(play, this->collectibleFlag); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; } else { diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 3be9ff149d..8325427ad3 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -130,7 +130,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { if ((this->actor.parent == NULL) || (!Player_IsHoldingHookshot(player))) { ArmsHook_DetachHookFromActor(this); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 9cf65349f1..cef5b04658 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -90,7 +90,7 @@ void FireArrow_ChargeAndWait(ArrowFire* this, PlayState* play) { EnArrow* arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->radius < 10) { @@ -156,7 +156,7 @@ void FireArrow_Hit(ArrowFire* this, PlayState* play) { } if (this->timer == 0) { this->timer = 255; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->timer >= 13) { @@ -171,7 +171,7 @@ void FireArrow_Fly(ArrowFire* this, PlayState* play) { s32 pad2; if ((arrow == NULL) || (arrow->actor.update == NULL)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -194,7 +194,7 @@ void FireArrow_Fly(ArrowFire* this, PlayState* play) { } if (arrow->unk_260 < 34) { if (this->alpha < 35) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->alpha -= 25; @@ -205,7 +205,7 @@ void ArrowFire_Update(Actor* thisx, PlayState* play) { ArrowFire* this = (ArrowFire*)thisx; if ((play->msgCtx.msgMode == 0xE) || (play->msgCtx.msgMode == 0x12)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 88eddb39e6..7db4c35d32 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -65,7 +65,7 @@ void ArrowIce_Charge(ArrowIce* this, PlayState* play) { EnArrow* arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -136,7 +136,7 @@ void ArrowIce_Hit(ArrowIce* this, PlayState* play) { if (this->timer == 0) { this->timer = 255; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -146,7 +146,7 @@ void ArrowIce_Fly(ArrowIce* this, PlayState* play) { s32 pad; if ((arrow == NULL) || (arrow->actor.update == NULL)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } // copy position and rotation from arrow @@ -166,7 +166,7 @@ void ArrowIce_Fly(ArrowIce* this, PlayState* play) { this->alpha = 255; } else if (arrow->unk_260 < 34) { if (this->alpha < 35) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->alpha -= 25; } @@ -177,7 +177,7 @@ void ArrowIce_Update(Actor* thisx, PlayState* play) { ArrowIce* this = THIS; if ((play->msgCtx.msgMode == 0xE) || (play->msgCtx.msgMode == 0x12)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } else { this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 9f974472f8..7ff828b2d8 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -64,7 +64,7 @@ void ArrowLight_Charge(ArrowLight* this, PlayState* play) { EnArrow* arrow = (EnArrow*)this->actor.parent; if ((arrow == NULL) || (arrow->actor.update == NULL)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -129,7 +129,7 @@ void ArrowLight_Hit(ArrowLight* this, PlayState* play) { } if (this->timer == 0) { this->timer = 255; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -139,7 +139,7 @@ void ArrowLight_Fly(ArrowLight* this, PlayState* play) { s32 pad[2]; if ((arrow == NULL) || (arrow->actor.update == NULL)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -162,7 +162,7 @@ void ArrowLight_Fly(ArrowLight* this, PlayState* play) { } if (arrow->unk_260 < 34) { if (this->alpha < 35) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->alpha -= 25; @@ -173,7 +173,7 @@ void ArrowLight_Update(Actor* thisx, PlayState* play) { ArrowLight* this = THIS; if ((play->msgCtx.msgMode == 0xE) || (play->msgCtx.msgMode == 0x12)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c b/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c index ab7ac8a52e..29692839e8 100644 --- a/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Astr_Bombwall/z_bg_astr_bombwall.c @@ -104,12 +104,12 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) { DynaPolyActor_LoadMesh(play, &this->dyna, &object_astr_obj_Colheader_002498); Collider_InitTris(play, &this->collider); if (Flags_GetSwitch(play, BGASTRBOMBWALL_GET_SWITCHFLAG(thisx))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } this->dyna.actor.flags |= ACTOR_FLAG_10000000; if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } BgAstrBombwall_InitCollider(&sTrisInit, &this->dyna.actor.world.pos, &this->dyna.actor.shape.rot, &this->collider); diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 9a272e6aae..ec9daab781 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -216,7 +216,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) { this->unk_15C = Object_GetIndex(&play->objectCtx, sp24->unk_00); if ((this->unk_15C < 0) || !sp24->unk_14(this, play)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -286,7 +286,7 @@ void func_808B782C(BgBreakwall* this, PlayState* play) { void func_808B78A4(BgBreakwall* this, PlayState* play) { if (gSaveContext.save.weekEventReg[55] & 0x80) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c b/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c index 9a4f0849a7..b3ebc982ed 100644 --- a/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c +++ b/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c @@ -92,7 +92,7 @@ void BgCraceMovebg_Init(Actor* thisx, PlayState* play) { for (j = 0; j < sLoadedDoorCount; j++) { if (sIsLoaded[j] == this->index) { this->stateFlags |= BG_CRACE_MOVEBG_FLAG_ALREADY_LOADED; - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } } @@ -125,7 +125,7 @@ void BgCraceMovebg_Init(Actor* thisx, PlayState* play) { break; default: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); break; } } diff --git a/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c b/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c index 056af77bb8..4922b4a6e2 100644 --- a/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c +++ b/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c @@ -174,7 +174,7 @@ void BgCtowerGear_UpdateOrgan(Actor* thisx, PlayState* play) { func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId); break; case 3: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); break; } } diff --git a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c index 44e38f0da5..6026e139b8 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c @@ -167,7 +167,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) { if ((this->unk_160 == 9) || (this->unk_160 == 8)) { if (D_80A2BBF4.unk_00 != 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } this->unk_170 = this->dyna.actor.room; @@ -178,7 +178,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) { this->dyna.actor.shape.rot.z = 0; } else if (this->unk_160 == 6) { if (D_80A2BBF4.unk_01 != 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } this->unk_171 = this->dyna.actor.world.rot.z; @@ -238,7 +238,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) { this->dyna.actor.world.rot.z = 0; this->dyna.actor.shape.rot.z = 0; if (Flags_GetSwitch(play, this->unk_1C0)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); break; } this->unk_18C = 0; @@ -350,7 +350,7 @@ void func_80A2A1E0(BgDblueMovebg* this, PlayState* play) { if (play->roomCtx.curRoom.num != this->unk_171) { if ((play->roomCtx.prevRoom.num != this->unk_170) && (play->roomCtx.prevRoom.num != this->unk_171)) { D_80A2BBF4.unk_01 = 0; - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } } @@ -452,7 +452,7 @@ void func_80A2A688(BgDblueMovebg* this, PlayState* play) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 60.0f, 2.0f) && (this->unk_180 <= 0)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } @@ -632,7 +632,7 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) { if (play->roomCtx.curRoom.num != this->unk_171) { if ((play->roomCtx.prevRoom.num != this->unk_170) && (play->roomCtx.prevRoom.num != this->unk_171)) { D_80A2BBF4.unk_00 = 0; - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } } @@ -733,7 +733,7 @@ void func_80A2B274(Actor* thisx, PlayState* play) { s16 temp_v1; if (this != D_80A2BBF0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } diff --git a/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c b/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c index 1ad295e68e..0d47e0d5a3 100644 --- a/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c +++ b/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c @@ -166,7 +166,7 @@ void func_809AC7F8(BgFireWall* this, PlayState* play) { void func_809AC970(BgFireWall* this, PlayState* play) { if (Math_StepToF(&this->actor.scale.y, 0.005f, this->unk_158)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c b/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c index f494131d9b..79dd09935b 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Haka_Bombwall/z_bg_haka_bombwall.c @@ -154,7 +154,7 @@ void BgHakaBombwall_Init(Actor* thisx, PlayState* play) { DynaPolyActor_Init(&this->dyna, 0); Collider_InitCylinder(play, &this->collider); if (Flags_GetSwitch(play, BGHAKABOMBWALL_GET_7F(thisx))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } else { DynaPolyActor_LoadMesh(play, &this->dyna, &object_haka_obj_Colheader_000148); Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); @@ -211,7 +211,7 @@ void BgHakaBombwall_EndCutscene(BgHakaBombwall* this, PlayState* play) { this->csTimer--; if (this->csTimer <= 0) { ActorCutscene_Stop(this->dyna.actor.cutscene); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c b/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c index 37a232bc5b..3a603868fb 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Bombwall/z_bg_hakugin_bombwall.c @@ -317,7 +317,7 @@ void BgHakuginBombwall_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); if (Flags_GetSwitch(play, BGHAKUGIN_BOMBWALL_SWITCHFLAG(&this->dyna.actor))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -414,7 +414,7 @@ void func_80ABCE60(BgHakuginBombwall* this, PlayState* play) { this->unk_1AC--; if (this->unk_1AC <= 0) { ActorCutscene_Stop(this->dyna.actor.cutscene); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } else if (this->unk_1AC == ptr->unk_2C) { ptr->unk_28(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c index ec2fd9e9cd..309e243556 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c @@ -709,7 +709,7 @@ void BgHakuginPost_Init(Actor* thisx, PlayState* play) { func_80A9CA94(this); } else { func_80A9AFB4(this, play, &D_80A9E028); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c b/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c index e64cbef706..ecdd861aa0 100644 --- a/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c +++ b/src/overlays/actors/ovl_Bg_Icefloe/z_bg_icefloe.c @@ -158,7 +158,7 @@ void func_80AC4D2C(BgIcefloe* this, PlayState* play) { } this->dyna.actor.scale.y -= 0.0026f; if (this->dyna.actor.scale.y <= 0.0f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c b/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c index aec62ce15e..6c9fa12de6 100644 --- a/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c +++ b/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c @@ -178,8 +178,7 @@ void BgIcicle_Fall(BgIcicle* this, PlayState* play) { func_800C6314(play, &play->colCtx.dyna, this->dyna.bgId); this->actionFunc = BgIcicle_Regrow; } else { - Actor_MarkForDeath(&this->dyna.actor); - return; + Actor_Kill(&this->dyna.actor); } } else { Actor_MoveWithGravity(&this->dyna.actor); @@ -225,7 +224,7 @@ void BgIcicle_UpdateAttacked(BgIcicle* this, PlayState* play) { BgIcicle_Break(this, play, 40.0f); } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c b/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c index 43627317e1..3144b599c2 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Bombwall/z_bg_ikana_bombwall.c @@ -239,7 +239,7 @@ void BgIkanaBombwall_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); if (Flags_GetSwitch(play, BGIKANABOMBWALL_GET_SWITCHFLAG(&this->dyna.actor))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -349,14 +349,14 @@ void func_80BD5134(BgIkanaBombwall* this, PlayState* play) { this->unk_1AC--; if (this->unk_1AC <= 0) { ActorCutscene_Stop(this->dyna.actor.cutscene); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } else if (this->dyna.actor.cutscene >= 0) { if (ActorCutscene_GetCurrentIndex() != this->dyna.actor.cutscene) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c b/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c index 6c5e85e73c..35727c0c16 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c @@ -204,13 +204,14 @@ void BgIkanaDharma_WaitForCutsceneToEnd(BgIkanaDharma* this, PlayState* play) { } } - if (Math_StepToF(&this->dyna.actor.scale.y, 0.0f, 1.0f / 300.0f) != 0) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - this->dyna.actor.scale.x = this->dyna.actor.scale.y * 3.0f; - this->dyna.actor.scale.z = this->dyna.actor.scale.y * 3.0f; - BgIkanaDharma_SpawnEffects(this, play); + if (Math_StepToF(&this->dyna.actor.scale.y, 0.0f, 1.0f / 300.0f)) { + Actor_Kill(&this->dyna.actor); + return; } + + this->dyna.actor.scale.x = this->dyna.actor.scale.y * 3.0f; + this->dyna.actor.scale.z = this->dyna.actor.scale.y * 3.0f; + BgIkanaDharma_SpawnEffects(this, play); } void BgIkanaDharma_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c b/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c index 07de845c05..c911eeea94 100644 --- a/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c +++ b/src/overlays/actors/ovl_Bg_Ikninside/z_bg_ikninside.c @@ -65,7 +65,7 @@ void BgIkninside_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); Collider_UpdateCylinder(&this->dyna.actor, &this->collider); if (Flags_GetSwitch(play, DMIKNINSIDE_GET_SWITCH(thisx))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c b/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c index 06091b12ba..e5a5dbc916 100644 --- a/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c +++ b/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c @@ -70,7 +70,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) { CollisionHeader_GetVirtual(&object_iknv_obj_Colheader_012788, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); if (!(gSaveContext.save.weekEventReg[14] & 4)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } break; @@ -90,7 +90,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) { break; default: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); break; } } diff --git a/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c b/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c index c0e9bdc42b..59fd2f340d 100644 --- a/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c +++ b/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c @@ -88,7 +88,7 @@ void BgIknvObj_Init(Actor* thisx, PlayState* play) { Actor_SetFocus(&this->dyna.actor, IREG(88)); break; default: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 95ca8936e7..43b7f27aa6 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -364,7 +364,7 @@ void BgIngate_Init(Actor* thisx, PlayState* play2) { } this->timePath = SubS_GetAdditionalPath(play, BGINGATE_GET_FF(&this->dyna.actor), 0); } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c b/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c index 86854cbe8d..2da4ddcee5 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Bombwall/z_bg_kin2_bombwall.c @@ -146,14 +146,15 @@ void BgKin2Bombwall_Init(Actor* thisx, PlayState* play) { bombwallCollider = &this->collider; Collider_InitCylinder(play, bombwallCollider); if (Flags_GetSwitch(play, BG_KIN2_BOMBWALL_SWITCH_FLAG(&this->dyna.actor))) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - DynaPolyActor_LoadMesh(play, &this->dyna, &gOceanSpiderHouseBombableWallCol); - Collider_SetCylinder(play, bombwallCollider, &this->dyna.actor, &sCylinderInit); - Collider_UpdateCylinder(&this->dyna.actor, bombwallCollider); - Actor_SetFocus(&this->dyna.actor, 60.0f); - BgKin2Bombwall_SetupWait(this); + Actor_Kill(&this->dyna.actor); + return; } + + DynaPolyActor_LoadMesh(play, &this->dyna, &gOceanSpiderHouseBombableWallCol); + Collider_SetCylinder(play, bombwallCollider, &this->dyna.actor, &sCylinderInit); + Collider_UpdateCylinder(&this->dyna.actor, bombwallCollider); + Actor_SetFocus(&this->dyna.actor, 60.0f); + BgKin2Bombwall_SetupWait(this); } void BgKin2Bombwall_Destroy(Actor* thisx, PlayState* play) { @@ -205,7 +206,7 @@ void BgKin2Bombwall_EndCutscene(BgKin2Bombwall* this, PlayState* play) { this->timer--; if (this->timer <= 0) { ActorCutscene_Stop(this->dyna.actor.cutscene); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c b/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c index 36226212e6..12a6030461 100644 --- a/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c +++ b/src/overlays/actors/ovl_Bg_Ladder/z_bg_ladder.c @@ -63,7 +63,7 @@ void BgLadder_Init(Actor* thisx, PlayState* play) { } else if (size == LADDER_SIZE_24RUNG) { DynaPolyActor_LoadMesh(play, &this->dyna, &object_ladder_Colheader_000868); } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } diff --git a/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c b/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c index 85272fa51f..65157403d9 100644 --- a/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c +++ b/src/overlays/actors/ovl_Bg_Last_Bwall/z_bg_last_bwall.c @@ -153,15 +153,19 @@ void BgLastBwall_Init(Actor* thisx, PlayState* play) { DynaPolyActor_LoadMesh(play, &this->dyna, D_80C18A48[this->type].colHeader); Collider_InitTris(play, &this->colliderTris); if (Flags_GetSwitch(play, BGLASTBWALL_GET_SWITCHFLAGS(&this->dyna.actor))) { - Actor_MarkForDeath(&this->dyna.actor); - } else if (!Collider_SetTris(play, &this->colliderTris, &this->dyna.actor, &sTrisInit, this->colliderTrisElement)) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - BgLastBwall_InitCollider(&sTrisInit, &this->dyna.actor.world.pos, &this->dyna.actor.shape.rot, - &this->colliderTris, D_80C18AC0[this->type]); - SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes)); - func_80C187E4(this); + Actor_Kill(&this->dyna.actor); + return; } + + if (!Collider_SetTris(play, &this->colliderTris, &this->dyna.actor, &sTrisInit, this->colliderTrisElement)) { + Actor_Kill(&this->dyna.actor); + return; + } + + BgLastBwall_InitCollider(&sTrisInit, &this->dyna.actor.world.pos, &this->dyna.actor.shape.rot, &this->colliderTris, + D_80C18AC0[this->type]); + SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes)); + func_80C187E4(this); } void BgLastBwall_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c b/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c index 8554e2b5a3..1605d6bc0e 100644 --- a/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c +++ b/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c @@ -157,7 +157,7 @@ void BgNumaHana_Init(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->torchCollider, &this->dyna.actor, &sCylinderInit); this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE; if (!BgNumaHana_SpawnOpenFlowerCollisionChild(this, play)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } diff --git a/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c b/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c index fb8f04d789..77490aef1f 100644 --- a/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c +++ b/src/overlays/actors/ovl_Bg_Sinkai_Kabe/z_bg_sinkai_kabe.c @@ -103,7 +103,7 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) { this->dyna.actor.unk20, NULL); } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } this->actionFunc = BgSinkaiKabe_WaitForPlayer; @@ -140,7 +140,7 @@ void BgSinkaiKabe_WaitForPlayer(BgSinkaiKabe* this, PlayState* play) { } if (this->deepPython == NULL) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c index 296f562686..1fca8ea9c1 100644 --- a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c +++ b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c @@ -170,7 +170,7 @@ void BgSpdweb_Init(Actor* thisx, PlayState* play) { this->unk_162 = 0; if (Flags_GetSwitch(play, this->switchFlag)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } @@ -230,7 +230,7 @@ void func_809CE234(BgSpdweb* this, PlayState* play) { if (this->unk_162 == 0) { ActorCutscene_Stop(this->dyna.actor.cutscene); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -373,7 +373,7 @@ void func_809CE830(BgSpdweb* this, PlayState* play) { if (ActorCutscene_GetLength(this->dyna.actor.cutscene) == -1) { ActorCutscene_Stop(this->dyna.actor.cutscene); } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index 2a584bb314..614738b9ff 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -107,13 +107,13 @@ void BgUmajump_Init(Actor* thisx, PlayState* play) { this->objectIndex = Object_GetIndex(&play->objectCtx, OBJECT_UMAJUMP); if (this->objectIndex < 0) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } if ((thisx->params == BG_UMAJUMP_TYPE_3) && CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_KANBAN, thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, thisx->shape.rot.z, 0x3E); - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } } } @@ -187,7 +187,7 @@ void func_8091A5A0(Actor* thisx, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_KANBAN, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, 0x3E); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } if (this->dyna.actor.params == BG_UMAJUMP_TYPE_5) { diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c index 0d0e55e62a..28008a674b 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -1097,7 +1097,7 @@ void func_809DBFB4(Boss02* this, PlayState* play) { } while (0); if ((s8)this->actor.colChkInfo.health <= 0) { - Actor_MarkForDeath(this->actor.child); + Actor_Kill(this->actor.child); this->actor.child = NULL; Enemy_StartFinishingBlow(play, &this->actor); this->skelAnime.playSpeed = 2.0f; @@ -1924,7 +1924,7 @@ void func_809DD934(Boss02* this, PlayState* play) { temp_a0_5 = play->actorCtx.actorLists[ACTORCAT_BG].first; while (temp_a0_5 != NULL) { if (temp_a0_5->id == ACTOR_BG_INIBS_MOVEBG) { - Actor_MarkForDeath(temp_a0_5); + Actor_Kill(temp_a0_5); break; } temp_a0_5 = temp_a0_5->next; diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index a0f3a208b8..e4d397f225 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -457,7 +457,7 @@ void Boss03_Init(Actor* thisx, PlayState* play2) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, PLATFORM_HEIGHT, 200.0f, 0, 0, 0, ENDOORWARP1_FF_1); Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 0.0f, PLATFORM_HEIGHT, 0.0f, 0, 0, 0, 0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_Boss_04/z_boss_04.c b/src/overlays/actors/ovl_Boss_04/z_boss_04.c index 9a7371c97d..1179d8eca6 100644 --- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c +++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c @@ -157,7 +157,7 @@ void Boss04_Init(Actor* thisx, PlayState* play2) { s32 pad; if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -277,7 +277,7 @@ void func_809EC568(Boss04* this, PlayState* play) { boss = play->actorCtx.actorLists[ACTORCAT_BOSS].first; while (boss != NULL) { if (boss->id == ACTOR_EN_WATER_EFFECT) { - Actor_MarkForDeath(boss); + Actor_Kill(boss); } boss = boss->next; } @@ -559,7 +559,7 @@ void func_809ED2A0(Boss04* this, PlayState* play) { } if (this->unk_1FA == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Boss_06/z_boss_06.c b/src/overlays/actors/ovl_Boss_06/z_boss_06.c index 1b8b6fef65..f693ffdea1 100644 --- a/src/overlays/actors/ovl_Boss_06/z_boss_06.c +++ b/src/overlays/actors/ovl_Boss_06/z_boss_06.c @@ -213,7 +213,7 @@ void func_809F24C8(Boss06* this, PlayState* play) { temp_s0 = play->actorCtx.actorLists[ACTORCAT_ITEMACTION].first; while (temp_s0 != NULL) { if (temp_s0->id == ACTOR_EN_ARROW) { - Actor_MarkForDeath(temp_s0); + Actor_Kill(temp_s0); } temp_s0 = temp_s0->next; } @@ -382,7 +382,7 @@ void func_809F2C44(Boss06* this, PlayState* play) { } if (D_809F4970->unk_153 == 2) { - Actor_MarkForDeath(this->actor.child); + Actor_Kill(this->actor.child); this->actor.child = NULL; func_809F2E14(this, play); } diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 8b5deef593..c9bd00e3f9 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -213,7 +213,7 @@ void func_808CDBDC(DemoEffect* this, PlayState* play) { func_800B8FE8(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); } else { func_808CDAD0(1.0f); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -232,7 +232,7 @@ void func_808CDD70(DemoEffect* this, PlayState* play) { this->timer++; if (this->actor.scale.x < 0.02f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c b/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c index d39c8aa17e..188ca5b87a 100644 --- a/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c +++ b/src/overlays/actors/ovl_Demo_Getitem/z_demo_getitem.c @@ -52,10 +52,11 @@ void DemoGetitem_Init(Actor* thisx, PlayState* play) { this->csAction = sCsActionIndices[itemIndex]; objectIndex = Object_GetIndex(&play->objectCtx, sObjectBankIndices[itemIndex]); if (objectIndex < 0) { - Actor_MarkForDeath(&this->actor); - } else { - this->objectIndex = objectIndex; + Actor_Kill(&this->actor); + return; } + + this->objectIndex = objectIndex; } void DemoGetitem_Destroy(Actor* thisx, PlayState* play) { @@ -82,17 +83,22 @@ void func_80A4FB68(DemoGetitem* this, PlayState* play2) { this->actor.draw = DemoGetitem_Draw; Cutscene_ActorTranslate(&this->actor, play, Cutscene_GetActorActionIndex(play, this->csAction)); this->actor.shape.rot.y += 0x3E8; - return; + break; + case 3: - Actor_MarkForDeath(&this->actor); - return; + Actor_Kill(&this->actor); + break; + case 4: this->actor.draw = DemoGetitem_Draw; Cutscene_ActorTranslateAndYaw(&this->actor, play, Cutscene_GetActorActionIndex(play, this->csAction)); this->actor.shape.yOffset = Math_SinS(sp22) * 15.0f; - return; + break; + + default: + this->actor.draw = NULL; + break; } - this->actor.draw = NULL; } else { this->actor.draw = NULL; } diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index 10b72634a2..be3a0ee47e 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -59,7 +59,7 @@ void DemoKakyo_LostWoodsSparkleActionFunc(DemoKankyo* this, PlayState* play) { if (play->envCtx.unk_F2[3] != 0) { play->envCtx.unk_F2[3]--; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (play->envCtx.unk_F2[3] < DEMOKANKYO_EFFECT_COUNT) { play->envCtx.unk_F2[3] += 16; @@ -454,7 +454,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) { DemoKankyo_SetupAction(this, DemoKakyo_LostWoodsSparkleActionFunc); sLostWoodsSparklesMutex = true; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; @@ -484,7 +484,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) { void DemoKankyo_Destroy(Actor* thisx, PlayState* play) { DemoKankyo* this = THIS; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void DemoKankyo_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index ca833fe0ef..646e437c39 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -131,7 +131,7 @@ void DemoTreLgt_Animate(DemoTreLgt* this, PlayState* play) { } } if (SkelCurve_Update(play, &this->skelCurve)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c index a40bd1bc38..7e61b13de2 100644 --- a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c +++ b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c @@ -528,7 +528,7 @@ void DmChar00_Init(Actor* thisx, PlayState* play) { DmChar00* this = THIS; if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } this->unk_240 = D_80AA77A8[DMCHAR00_GET(thisx)]; @@ -648,7 +648,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) { break; case 0x16: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case 0x17: diff --git a/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c b/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c index 6d3b18c2da..9f4c7cf1cc 100644 --- a/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c +++ b/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c @@ -124,7 +124,7 @@ void DmChar01_Init(Actor* thisx, PlayState* play) { this->dyna.actor.world.rot.y += 0x8000; this->dyna.actor.shape.rot.y += 0x8000; if (!(gSaveContext.save.weekEventReg[20] & 1)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } diff --git a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c index da67e6f1cd..1031a3bb6e 100644 --- a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c +++ b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c @@ -92,7 +92,7 @@ void DmChar02_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); this->actionFunc = DmChar02_PerformCutsceneActions; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -151,7 +151,7 @@ void DmChar02_Update(Actor* thisx, PlayState* play) { Actor_PickUp(&this->actor, play, GI_OCARINA, 30.0f, 80.0f); } else { gSaveContext.save.playerForm = PLAYER_FORM_HUMAN; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } DmChar02_PlaySfxForCutscenes(this, play); diff --git a/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c b/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c index 397fbfa3c0..d755cc7ff9 100644 --- a/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c +++ b/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c @@ -106,7 +106,7 @@ void func_80AAB710(DmChar03* this, PlayState* play) { case 3: this->unk_18E = false; shouldChangeAnim = false; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case 4: Item_Give(play, ITEM_MASK_DEKU); diff --git a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c index 5b66138138..5a7caebc81 100644 --- a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c +++ b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c @@ -338,7 +338,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { case 5: sp2F = false; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; default: @@ -382,7 +382,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { case 5: sp2F = false; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; default: @@ -425,7 +425,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { case 5: sp2F = false; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; default: diff --git a/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c b/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c index afcd2b55d9..be25e9ccc2 100644 --- a/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c +++ b/src/overlays/actors/ovl_Dm_Ravine/z_dm_ravine.c @@ -33,7 +33,7 @@ void DmRavine_Init(Actor* thisx, PlayState* play) { DmRavine* this = THIS; if (((((void)0, gSaveContext.save.weekEventReg[0]) & 0x10) | cREG(0)) != 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -71,7 +71,7 @@ void DmRavine_Update(Actor* thisx, PlayState* play) { } break; case DM_RAVINE_STATE_PENDING_DEATH: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; } } diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index 90ccb1382f..24b9ae8571 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -1017,7 +1017,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->objectStk2ObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_STK2); this->objectStk3ObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_STK3); if (this->objectStkObjectIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->tatlMessageTimer = 0; @@ -1090,7 +1090,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { } else if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 0)) { if (!(play->actorCtx.flags & ACTORCTX_FLAG_1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->maskType = SK_MASK_TYPE_GLOWING_EYES; @@ -1102,7 +1102,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->actionFunc = DmStk_WaitForTelescope; } else { if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->maskType = SK_MASK_TYPE_GLOWING_EYES; @@ -1420,7 +1420,7 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { break; case 25: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case 26: @@ -1632,7 +1632,7 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { this->fadeOutState = SK_FADE_OUT_STATE_NONE; gSaveContext.save.weekEventReg[12] |= 4; if (!(play->actorCtx.flags & ACTORCTX_FLAG_1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->shouldDraw = false; } diff --git a/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c b/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c index 2c8bf046f5..b00eea3f73 100644 --- a/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c +++ b/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c @@ -231,7 +231,7 @@ void DmTag_Init(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); if (gSaveContext.save.weekEventReg[85] & 4) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -243,7 +243,7 @@ void DmTag_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; this->actionFunc = func_80C229EC; } else if (this->actor.room == 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->actor.targetMode = 1; this->unk_18E = 1; diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index d7913b775f..6812db67a8 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -200,7 +200,6 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { DoorShutter* this = THIS; s32 sp24; s32 i; - s8 objId; Actor_ProcessInitChain(&this->actor, sInitChain); this->doorType = DOORSHUTTER_GET_380(&this->actor); @@ -233,9 +232,10 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { this->actor.room = -1; } - // clang-format off - objId = Object_GetIndex(&play->objectCtx, D_808A2180[sp24].objectId); this->requiredObjBankIndex = objId; if (objId < 0) { Actor_MarkForDeath(&this->actor); return; } - // clang-format on + if ((this->requiredObjBankIndex = Object_GetIndex(&play->objectCtx, D_808A2180[sp24].objectId)) < 0) { + Actor_Kill(&this->actor); + return; + } DoorShutter_SetupAction(this, DoorShutter_SetupType); this->unk_163 = sp24; diff --git a/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c b/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c index be9b5c0931..0d13c89c6a 100644 --- a/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c +++ b/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c @@ -179,7 +179,7 @@ void DoorSpiral_Init(Actor* thisx, PlayState* play) { s8 objBankId; if (this->actor.room != play->doorCtx.transitionActorList[transition].sides[0].room) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -191,7 +191,7 @@ void DoorSpiral_Init(Actor* thisx, PlayState* play) { this->bankIndex = objBankId; if (objBankId < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_Eff_Change/z_eff_change.c b/src/overlays/actors/ovl_Eff_Change/z_eff_change.c index 0f52456175..71aab6f0b6 100644 --- a/src/overlays/actors/ovl_Eff_Change/z_eff_change.c +++ b/src/overlays/actors/ovl_Eff_Change/z_eff_change.c @@ -79,40 +79,41 @@ void func_80A4C5CC(EffChange* this, PlayState* play) { f32 phi_fv0; if (func_80183DE0(&this->skeletonInfo)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); ActorCutscene_Stop(0x7B); func_800FD2B4(play, 0.0f, 850.0f, 0.2f, 0.0f); - } else { - this->step++; - if (this->skeletonInfo.frameCtrl.unk_10 < 20.0f) { - if ((this->primColors[3]) < 242) { - this->primColors[3] += 13; - } else { - this->primColors[3] = 255; - } - } else if (this->skeletonInfo.frameCtrl.unk_10 > 70.0f) { - if ((this->primColors[3]) >= 14) { - this->primColors[3] -= 13; - } else { - this->primColors[3] = 0; - } + return; + } + + this->step++; + if (this->skeletonInfo.frameCtrl.unk_10 < 20.0f) { + if ((this->primColors[3]) < 242) { + this->primColors[3] += 13; } else { this->primColors[3] = 255; } - - phi_fv0 = this->primColors[3] * (1.0f / 255.0f); - if (phi_fv0 > 1.0f) { - phi_fv0 = 1.0f; - } else if (phi_fv0 < 0.0f) { - phi_fv0 = 0.0f; + } else if (this->skeletonInfo.frameCtrl.unk_10 > 70.0f) { + if ((this->primColors[3]) >= 14) { + this->primColors[3] -= 13; + } else { + this->primColors[3] = 0; } - func_800FD2B4(play, phi_fv0, 850.0f, 0.2f, 0.0f); - if (ActorCutscene_GetCurrentIndex() != 0x7B) { - if (ActorCutscene_GetCanPlayNext(0x7B)) { - ActorCutscene_Start(0x7B, &this->actor); - } else { - ActorCutscene_SetIntentToPlay(0x7B); - } + } else { + this->primColors[3] = 255; + } + + phi_fv0 = this->primColors[3] * (1.0f / 255.0f); + if (phi_fv0 > 1.0f) { + phi_fv0 = 1.0f; + } else if (phi_fv0 < 0.0f) { + phi_fv0 = 0.0f; + } + func_800FD2B4(play, phi_fv0, 850.0f, 0.2f, 0.0f); + if (ActorCutscene_GetCurrentIndex() != 0x7B) { + if (ActorCutscene_GetCanPlayNext(0x7B)) { + ActorCutscene_Start(0x7B, &this->actor); + } else { + ActorCutscene_SetIntentToPlay(0x7B); } } } diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index e23ed12043..3bf0393601 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -175,7 +175,7 @@ void func_80919230(EffDust* this, PlayState* play) { if (this->life != 0) { this->life--; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } for (i = 0; i < ARRAY_COUNT(this->distanceTraveled); i++) { diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index 5d39059148..46ef861b97 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -46,7 +46,7 @@ s32 func_8092DF9C(ElfMsg* this, PlayState* play) { if (ELFMSG_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } if (this->actor.home.rot.y == 0x81) { @@ -54,7 +54,7 @@ s32 func_8092DF9C(ElfMsg* this, PlayState* play) { if (ELFMSG_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } } @@ -63,7 +63,7 @@ s32 func_8092DF9C(ElfMsg* this, PlayState* play) { } if (Flags_GetSwitch(play, ELFMSG_GET_SWITCHFLAG(&this->actor))) { (void)"共倒れ"; // "Collapse together" - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; @@ -139,9 +139,12 @@ void ElfMsg_Update(Actor* thisx, PlayState* play) { if (ELFMSG_GET_SWITCHFLAG(thisx) != 0x7F) { Flags_SetSwitch(play, ELFMSG_GET_SWITCHFLAG(thisx)); } - Actor_MarkForDeath(&this->actor); - } else if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || - (Flags_GetSwitch(play, -1 - this->actor.home.rot.y))) { + Actor_Kill(&this->actor); + return; + } + + if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || + (Flags_GetSwitch(play, -1 - this->actor.home.rot.y))) { this->actionFunc(this, play); } } diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 6e78ef085e..35b83bd6fc 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -46,7 +46,7 @@ s32 func_8096EC4C(ElfMsg2* this, PlayState* play) { if (ELFMSG2_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } if (this->actor.home.rot.y == 129) { @@ -56,7 +56,7 @@ s32 func_8096EC4C(ElfMsg2* this, PlayState* play) { if (ELFMSG2_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } } @@ -65,7 +65,7 @@ s32 func_8096EC4C(ElfMsg2* this, PlayState* play) { } if (Flags_GetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor))) { (void)"共倒れ"; // "Collapse together" - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; @@ -105,14 +105,16 @@ void func_8096EE64(ElfMsg2* this, PlayState* play) { ActorCutscene_Stop(this->actor.cutscene); } } + if (this->actor.home.rot.z != 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (ELFMSG2_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG2_GET_SWITCHFLAG(&this->actor)); } - } else { - ElfMsg2_SetupAction(this, func_8096EF98); + return; } + + ElfMsg2_SetupAction(this, func_8096EF98); } else if ((this->actor.cutscene != -1) && (ActorCutscene_GetCurrentIndex() != this->actor.cutscene)) { if (ActorCutscene_GetCurrentIndex() == 0x7C) { ActorCutscene_Stop(0x7C); diff --git a/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c b/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c index a62a22ad0a..2e0f27d691 100644 --- a/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c +++ b/src/overlays/actors/ovl_Elf_Msg3/z_elf_msg3.c @@ -45,7 +45,7 @@ s32 func_80A2CD1C(ElfMsg3* this, PlayState* play) { if (ELFMSG3_GET_SWITCH(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG3_GET_SWITCH(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } if (this->actor.home.rot.y == 0x81) { @@ -53,7 +53,7 @@ s32 func_80A2CD1C(ElfMsg3* this, PlayState* play) { if (ELFMSG3_GET_SWITCH(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG3_GET_SWITCH(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } } @@ -62,7 +62,7 @@ s32 func_80A2CD1C(ElfMsg3* this, PlayState* play) { } if (Flags_GetSwitch(play, ELFMSG3_GET_SWITCH(&this->actor))) { (void)"共倒れ"; // "Collapse together" - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; @@ -137,9 +137,12 @@ void ElfMsg3_Update(Actor* thisx, PlayState* play) { if (ELFMSG3_GET_SWITCH(thisx) != 0x7F) { Flags_SetSwitch(play, ELFMSG3_GET_SWITCH(thisx)); } - Actor_MarkForDeath(&this->actor); - } else if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || - (Flags_GetSwitch(play, -1 - this->actor.home.rot.y))) { + Actor_Kill(&this->actor); + return; + } + + if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || + (Flags_GetSwitch(play, -1 - this->actor.home.rot.y))) { this->actionFunc(this, play); } } diff --git a/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c b/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c index 4c6f143ff9..f44265d555 100644 --- a/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c +++ b/src/overlays/actors/ovl_Elf_Msg4/z_elf_msg4.c @@ -46,7 +46,7 @@ s32 func_80AFD380(ElfMsg4* this, PlayState* play) { if (ELFMSG4_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG4_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } if (this->actor.home.rot.y == 0x81) { @@ -54,7 +54,7 @@ s32 func_80AFD380(ElfMsg4* this, PlayState* play) { if (ELFMSG4_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG4_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } } @@ -63,7 +63,7 @@ s32 func_80AFD380(ElfMsg4* this, PlayState* play) { } if (Flags_GetSwitch(play, ELFMSG4_GET_SWITCHFLAG(&this->actor))) { (void)"共倒れ"; // "Collapse together" - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; @@ -156,14 +156,20 @@ void ElfMsg4_Update(Actor* thisx, PlayState* play) { if (!func_80AFD380(this, play)) { bgActor = this->elfMsg5; if ((bgActor != NULL) && (bgActor->update == NULL)) { - Actor_MarkForDeath(&this->actor); - } else if ((bgActor != NULL) && (Actor_ProcessTalkRequest(bgActor, &play->state))) { + Actor_Kill(&this->actor); + return; + } + + if ((bgActor != NULL) && (Actor_ProcessTalkRequest(bgActor, &play->state))) { if (ELFMSG4_GET_SWITCHFLAG(thisx) != 0x7F) { Flags_SetSwitch(play, ELFMSG4_GET_SWITCHFLAG(thisx)); } - Actor_MarkForDeath(&this->actor); - } else if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || - (Flags_GetSwitch(play, -1 - this->actor.home.rot.y))) { + Actor_Kill(&this->actor); + return; + } + + if ((this->actor.home.rot.y >= 0) || (this->actor.home.rot.y < -0x80) || + (Flags_GetSwitch(play, -1 - this->actor.home.rot.y))) { this->actionFunc(this, play); } } diff --git a/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c b/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c index bcc88ad5d5..5bf6687664 100644 --- a/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c +++ b/src/overlays/actors/ovl_Elf_Msg5/z_elf_msg5.c @@ -41,7 +41,7 @@ s32 func_80AFD990(ElfMsg5* this, PlayState* play) { if (ELFMSG5_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG5_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } if (this->actor.home.rot.y == 0x81) { @@ -50,7 +50,7 @@ s32 func_80AFD990(ElfMsg5* this, PlayState* play) { if (ELFMSG5_GET_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG5_GET_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } } @@ -59,7 +59,7 @@ s32 func_80AFD990(ElfMsg5* this, PlayState* play) { } if (Flags_GetSwitch(play, ELFMSG5_GET_SWITCHFLAG(&this->actor))) { (void)"共倒れ"; // Collapse together - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; diff --git a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c index c21da42b05..4bb598a0ea 100644 --- a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c +++ b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c @@ -147,7 +147,7 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) { case 0: this->actionFunc = func_80BA1E30; if (func_80BA16F4(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -156,21 +156,21 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80BA1F80; if ((this->actor.cutscene == -1) || ((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor)))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } switch (ELFMSG6_GET_F0(&this->actor)) { case 0: if (gSaveContext.save.inventory.items[ITEM_HOOKSHOT] != ITEM_HOOKSHOT) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case 1: if (gSaveContext.save.weekEventReg[83] & 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -179,19 +179,19 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) { case 2: if (INV_CONTENT(ITEM_OCARINA) == ITEM_OCARINA) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (gSaveContext.save.weekEventReg[8] & 0x40) { if (gSaveContext.save.weekEventReg[88] & 0x20) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.textId = 0x25B; } else { if (!(gSaveContext.save.weekEventReg[74] & 0x20) || (gSaveContext.save.weekEventReg[79] & 0x10)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.textId = 0x224; @@ -204,7 +204,7 @@ void ElfMsg6_Init(Actor* thisx, PlayState* play) { Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor))) || (gSaveContext.save.weekEventReg[88] & 0x10) || (gSaveContext.save.weekEventReg[91] & 1) || (INV_CONTENT(ITEM_MASK_ZORA) == ITEM_MASK_ZORA)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc = func_80BA2048; @@ -272,7 +272,7 @@ void func_80BA1CF8(ElfMsg6* this, PlayState* play) { gSaveContext.save.weekEventReg[88] |= 0x20; break; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -315,7 +315,7 @@ void func_80BA1E30(ElfMsg6* this, PlayState* play) { break; } func_80BA165C(); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -331,7 +331,7 @@ void func_80BA1E30(ElfMsg6* this, PlayState* play) { void func_80BA1F80(ElfMsg6* this, PlayState* play) { if (((ELFMSG6_GET_F0(&this->actor)) == 1) && (gSaveContext.save.weekEventReg[83] & 2)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -339,10 +339,11 @@ void func_80BA1F80(ElfMsg6* this, PlayState* play) { if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, NULL); Flags_SetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor)); - Actor_MarkForDeath(&this->actor); - } else { - ActorCutscene_SetIntentToPlay(this->actor.cutscene); + Actor_Kill(&this->actor); + return; } + + ActorCutscene_SetIntentToPlay(this->actor.cutscene); } } @@ -357,14 +358,14 @@ void func_80BA2048(ElfMsg6* this, PlayState* play) { if (ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor))) || (gSaveContext.save.weekEventReg[88] & 0x10) || (gSaveContext.save.weekEventReg[91] & 1) || (INV_CONTENT(ITEM_MASK_ZORA) == ITEM_MASK_ZORA)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -375,7 +376,7 @@ void func_80BA2048(ElfMsg6* this, PlayState* play) { void func_80BA215C(ElfMsg6* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -392,13 +393,13 @@ void func_80BA21C4(ElfMsg6* this, PlayState* play) { if (ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) { Flags_SetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor)); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (((ELFMSG6_SWITCHFLAG(&this->actor) != 0x7F) && Flags_GetSwitch(play, ELFMSG6_SWITCHFLAG(&this->actor))) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Ah/z_en_ah.c b/src/overlays/actors/ovl_En_Ah/z_en_ah.c index 7c0dfa71c8..72bdb7a7cf 100644 --- a/src/overlays/actors/ovl_En_Ah/z_en_ah.c +++ b/src/overlays/actors/ovl_En_Ah/z_en_ah.c @@ -512,7 +512,7 @@ void EnAh_Init(Actor* thisx, PlayState* play) { EnAh* this = THIS; if (func_80BD2A30(this, play, ACTORCAT_NPC, ACTOR_EN_AH)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index 4e7a51c971..14db58193a 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -1099,10 +1099,10 @@ void func_80BEE938(EnAkindonuts* this, PlayState* play) { if (ENAKINDONUTS_GET_4(&this->actor)) { this->unk_2DC = func_80BED680; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (ENAKINDONUTS_GET_4(&this->actor)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_2DC = func_80BED3BC; } @@ -1113,10 +1113,10 @@ void func_80BEE938(EnAkindonuts* this, PlayState* play) { if (ENAKINDONUTS_GET_4(&this->actor)) { this->unk_2DC = func_80BEDB88; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (ENAKINDONUTS_GET_4(&this->actor)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_2DC = func_80BED8A4; } @@ -1127,10 +1127,10 @@ void func_80BEE938(EnAkindonuts* this, PlayState* play) { if (ENAKINDONUTS_GET_4(&this->actor)) { this->unk_2DC = func_80BEE070; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (ENAKINDONUTS_GET_4(&this->actor)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_2DC = func_80BEDDAC; } @@ -1141,10 +1141,10 @@ void func_80BEE938(EnAkindonuts* this, PlayState* play) { if (ENAKINDONUTS_GET_4(&this->actor)) { this->unk_2DC = func_80BEE530; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (ENAKINDONUTS_GET_4(&this->actor)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_2DC = func_80BEE274; } @@ -1586,7 +1586,7 @@ void func_80BEFAF0(EnAkindonuts* this, PlayState* play) { } void func_80BEFD74(EnAkindonuts* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnAkindonuts_Init(Actor* thisx, PlayState* play) { @@ -1608,7 +1608,7 @@ void EnAkindonuts_Init(Actor* thisx, PlayState* play) { if (!ENAKINDONUTS_GET_4(&this->actor)) { this->path = SubS_GetPathByIndex(play, ENAKINDONUTS_GET_FC00(&this->actor), 0x3F); if (this->path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 858d125c08..bc30c333e1 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -437,7 +437,7 @@ void func_808B0894(EnAm* this, PlayState* play) { func_800B0EB0(play, &dustPos, &gZeroVec3f, &gZeroVec3f, &D_808B1120, &D_808B1124, 200, 45, 12); } } else if (this->explodeTimer == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } else if (!(this->explodeTimer & 3)) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 4); diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 8fd78fb51e..5f627e2d47 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -170,7 +170,7 @@ void func_8088A594(EnArrow* this, PlayState* play) { if (this->actor.params == ENARROW_7) { Magic_Reset(play); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -298,7 +298,7 @@ void func_8088AA98(EnArrow* this, PlayState* play) { if ((this->actor.params == ENARROW_4) || (this->actor.params == ENARROW_3)) { if ((this->actor.params == ENARROW_4) && (func_8088B6B0 != this->actionFunc)) { Actor_Spawn(&play->actorCtx, play, ACTOR_BG_ICEFLOE, sp44.x, sp44.y, sp44.z, 0, 0, 0, 300); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -306,7 +306,7 @@ void func_8088AA98(EnArrow* this, PlayState* play) { this->collider.info.toucher.dmgFlags = 0x20; if (this->actor.child != NULL) { - Actor_MarkForDeath(this->actor.child); + Actor_Kill(this->actor.child); return; } @@ -357,7 +357,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { EffectSs_Spawn(play, EFFECT_SS_SBN, 128, &sp84); } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -382,7 +382,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { } EffectSsStone1_Spawn(play, &this->actor.world.pos, 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, sp82); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { EffectSsHitmark_SpawnCustomScale(play, 0, 150, &this->actor.world.pos); @@ -516,7 +516,7 @@ void func_8088B630(EnArrow* this, PlayState* play) { } if (DECR(this->unk_260) == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -526,7 +526,7 @@ void func_8088B6B0(EnArrow* this, PlayState* play) { func_8088AA98(this, play); if (DECR(this->unk_260) == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index 72ca1ba8e9..532eebd34d 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -282,7 +282,7 @@ void EnAttackNiw_EnterViewFromOffscreen(EnAttackNiw* this, PlayState* play) { void EnAttackNiw_AimAtPlayer(EnAttackNiw* this, PlayState* play) { if (!EnAttackNiw_IsOnScreen(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -334,7 +334,7 @@ void EnAttackNiw_AimAtPlayer(EnAttackNiw* this, PlayState* play) { void EnAttackNiw_FlyAway(EnAttackNiw* this, PlayState* play) { if (!EnAttackNiw_IsOnScreen(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -376,10 +376,12 @@ void EnAttackNiw_Update(Actor* thisx, PlayState* play) { } if (this->actor.floorHeight <= BGCHECK_Y_MIN) { // under the world - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); + return; + } - } else if ((this->actor.bgCheckFlags & 0x20) && // on or below water - (this->actionFunc != EnAttackNiw_FlyAway)) { + if ((this->actor.bgCheckFlags & 0x20) && // on or below water + (this->actionFunc != EnAttackNiw_FlyAway)) { Math_Vec3f_Copy(&splashPos, &this->actor.world.pos); splashPos.y += this->actor.depthInWater; EffectSsGSplash_Spawn(play, &splashPos, NULL, NULL, 0, 400); diff --git a/src/overlays/actors/ovl_En_Az/z_en_az.c b/src/overlays/actors/ovl_En_Az/z_en_az.c index 08333482e3..2bb0a6afce 100644 --- a/src/overlays/actors/ovl_En_Az/z_en_az.c +++ b/src/overlays/actors/ovl_En_Az/z_en_az.c @@ -162,7 +162,7 @@ void func_80A94B20(PlayState* play) { ring = SubS_FindActor(play, ring, ACTORCAT_MISC, ACTOR_EN_TWIG); if (ring != NULL) { if (RACERING_GET_PARAM_F(ring) == 1) { - Actor_MarkForDeath(ring); + Actor_Kill(ring); } ring = ring->next; } @@ -240,7 +240,7 @@ void EnAz_Init(Actor* thisx, PlayState* play2) { break; } if (phi_v1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index dcbbee65d6..abd69adc81 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -514,7 +514,7 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { (BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) { if ((gSaveContext.save.weekEventReg[58] & 0x40) || (gSaveContext.save.time >= CLOCK_TIME(0, 20) && (gSaveContext.save.time < CLOCK_TIME(6, 0)))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -525,7 +525,7 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { } else if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_IDLE) && (gSaveContext.save.entrance == ENTRANCE(NORTH_CLOCK_TOWN, 7))) { if (gSaveContext.save.weekEventReg[81] & 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -540,7 +540,7 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { this->stateFlags |= BOMB_SHOP_LADY_STATE_AUTOTALK; this->actionFunc = EnBaba_Idle; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else { diff --git a/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c b/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c index e2496e18ed..a4bf9c5650 100644 --- a/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c +++ b/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c @@ -299,7 +299,7 @@ void EnBaguo_RetreatUnderground(EnBaguo* this, PlayState* play) { void EnBaguo_PostDetonation(EnBaguo* this, PlayState* play) { if (this->timer == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (this->timer >= 26) { diff --git a/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c b/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c index 3555f09982..db30813eac 100644 --- a/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c +++ b/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c @@ -73,7 +73,7 @@ void EnBaisen_Init(Actor* thisx, PlayState* play) { this->unk290 = true; if (!(gSaveContext.save.weekEventReg[63] & 0x80) && ((gSaveContext.save.day != 3) || !gSaveContext.save.isNight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { this->collider.dim.radius = 30; @@ -81,7 +81,7 @@ void EnBaisen_Init(Actor* thisx, PlayState* play) { this->collider.dim.yShift = 0; if ((gSaveContext.save.weekEventReg[63] & 0x80) || ((gSaveContext.save.day == 3) && (gSaveContext.save.isNight))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } this->actor.targetMode = 6; @@ -249,7 +249,7 @@ void EnBaisen_Update(Actor* thisx, PlayState* play) { } this->actor.shape.rot.y = this->actor.world.rot.y; if ((this->paramCopy != 0) && (gSaveContext.save.day == 3) && gSaveContext.save.isNight) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Bat/z_en_bat.c b/src/overlays/actors/ovl_En_Bat/z_en_bat.c index 5bec14e3e9..96e780dcc7 100644 --- a/src/overlays/actors/ovl_En_Bat/z_en_bat.c +++ b/src/overlays/actors/ovl_En_Bat/z_en_bat.c @@ -142,10 +142,10 @@ void EnBat_Init(Actor* thisx, PlayState* play) { Actor_SetFocus(thisx, 20.0f); if (sAlreadySpawned) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } else if (EnBat_IsGraveyardOnSecondDay(play)) { if (Flags_GetSwitch(play, this->switchFlag)) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } else { this->actor.room = -1; } @@ -369,7 +369,7 @@ void EnBat_Die(EnBat* this, PlayState* play) { func_800B3030(play, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 100, 0, 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (this->actor.room == -1) { Actor* enemy = NULL; diff --git a/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c b/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c index 8398a69edf..2e5efb11e1 100644 --- a/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c +++ b/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c @@ -220,7 +220,7 @@ void EnBba01_Init(Actor* thisx, PlayState* play) { if ((this->enHy.animObjIndex < 0) || (this->enHy.headObjIndex < 0) || (this->enHy.skelUpperObjIndex < 0) || (this->enHy.skelLowerObjIndex < 0)) { - Actor_MarkForDeath(&this->enHy.actor); + Actor_Kill(&this->enHy.actor); } this->enHy.actor.draw = NULL; Collider_InitCylinder(play, &this->enHy.collider); diff --git a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c index 875a5a0799..24300222d7 100644 --- a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c +++ b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c @@ -466,12 +466,13 @@ void EnBbfall_Dead(EnBbfall* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->bodyPartsPos[i], 11, NA_SE_EN_EXTINCT); } - Actor_MarkForDeath(&this->actor); - } else { - for (i = 0; i < ARRAY_COUNT(this->bodyPartsPos); i++) { - Math_Vec3f_Sum(&this->bodyPartsPos[i], &this->bodyPartsVelocity[i], &this->bodyPartsPos[i]); - this->bodyPartsVelocity[i].y += this->actor.gravity; - } + Actor_Kill(&this->actor); + return; + } + + for (i = 0; i < ARRAY_COUNT(this->bodyPartsPos); i++) { + Math_Vec3f_Sum(&this->bodyPartsPos[i], &this->bodyPartsVelocity[i], &this->bodyPartsPos[i]); + this->bodyPartsVelocity[i].y += this->actor.gravity; } } diff --git a/src/overlays/actors/ovl_En_Bee/z_en_bee.c b/src/overlays/actors/ovl_En_Bee/z_en_bee.c index 7d40e99313..0745c55eae 100644 --- a/src/overlays/actors/ovl_En_Bee/z_en_bee.c +++ b/src/overlays/actors/ovl_En_Bee/z_en_bee.c @@ -243,7 +243,7 @@ void EnBee_UpdateDamage(EnBee* this, PlayState* play) { this->actor.colChkInfo.health = 0; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_EXTINCT); func_800B3030(play, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 100, 0, 2); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index ba7273f598..f2fe54dae6 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -106,7 +106,7 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) { if (gSaveContext.save.weekEventReg[20] & 2 || ((this->picto.actor.params != 0xFF) && Flags_GetSwitch(play, this->picto.actor.params))) { - Actor_MarkForDeath(&this->picto.actor); + Actor_Kill(&this->picto.actor); } else { this->picto.actor.world.pos.y -= 99.0f; EnBigokuta_SetupIdle(this); @@ -451,7 +451,7 @@ void EnBigokuta_PlayDeathEffects(EnBigokuta* this, PlayState* play) { } ActorCutscene_Stop(this->cutscene); - Actor_MarkForDeath(&this->picto.actor); + Actor_Kill(&this->picto.actor); if (!(gSaveContext.eventInf[4] & 2) && !(gSaveContext.eventInf[3] & 0x20)) { func_800B724C(play, &this->picto.actor, 6); @@ -517,7 +517,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play) { EnBigokuta* this = THIS; if (!EnBigokuta_IsInWater(this, play)) { - Actor_MarkForDeath(&this->picto.actor); + Actor_Kill(&this->picto.actor); return; } diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index bf6e46e36a..c3cdf829fe 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -710,7 +710,7 @@ void func_80A28EE8(EnBigpamet* this, PlayState* play) { func_800B0DE0(play, &pos, &gZeroVec3f, &gZeroVec3f, &D_80A29788, &D_80A2978C, 800, 50); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_NPC_FADEAWAY); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.scale.y = this->actor.scale.x; diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index 57dae03687..8c22c064f9 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -185,11 +185,12 @@ void EnBigpo_Init(Actor* thisx, PlayState* play2) { thisx->params &= 0xFF; if (thisx->params == ENBIGPO_POSSIBLEFIRE) { if (Flags_GetSwitch(play, this->switchFlags)) { - Actor_MarkForDeath(&this->actor); - } else { - thisx->update = Actor_Noop; - EnBigpo_InitHiddenFire(this); + Actor_Kill(&this->actor); + return; } + + thisx->update = Actor_Noop; + EnBigpo_InitHiddenFire(this); return; } @@ -215,7 +216,7 @@ void EnBigpo_Init(Actor* thisx, PlayState* play2) { this->mainColor.a = 0; // fully invisible if ((this->switchFlags != 0xFF) && (Flags_GetSwitch(play, this->switchFlags))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (thisx->params == ENBIGPO_REGULAR) { // the well poe, starts immediately @@ -819,8 +820,11 @@ void EnBigpo_SetupScoopSoulIdle(EnBigpo* this) { void EnBigpo_ScoopSoulIdle(EnBigpo* this, PlayState* play) { DECR(this->idleTimer); if (Actor_HasParent(&this->actor, play)) { - Actor_MarkForDeath(&this->actor); - } else if (this->idleTimer == 0) { + Actor_Kill(&this->actor); + return; + } + + if (this->idleTimer == 0) { // took too long, soul is leaving Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_LAUGH); EnBigpo_SetupScoopSoulLeaving(this); @@ -838,7 +842,7 @@ void EnBigpo_SetupScoopSoulLeaving(EnBigpo* this) { void EnBigpo_ScoopSoulFadingAway(EnBigpo* this, PlayState* play) { EnBigpo_AdjustPoAlpha(this, -13); if (this->mainColor.a == 0) { // fully invisible - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -981,7 +985,7 @@ void EnBigpo_WaitingForDampe(EnBigpo* this, PlayState* play) { } void EnBigpo_Die(EnBigpo* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnBigpo_SetupFireRevealed(EnBigpo* this) { @@ -1045,7 +1049,7 @@ void EnBigpo_FlameCircleCutscene(EnBigpo* this, PlayState* play) { EnBigpo* parentPoh = (EnBigpo*)this->actor.parent; Flags_SetSwitch(play, this->switchFlags); Math_Vec3f_Copy(&parentPoh->fires[this->unk20C].pos, &this->actor.world.pos); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (this->unk20C == 0) { parentPoh->actor.draw = EnBigpo_DrawCircleFlames; Actor_SetScale(&parentPoh->actor, 0.01f); diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index f65172093e..1cac3caff5 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -341,7 +341,7 @@ void EnBigslime_Init(Actor* thisx, PlayState* play2) { this->actor.params = CLAMP(this->actor.params, 1, 4); if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (!(gSaveContext.save.weekEventReg[isFrogReturnedFlags[this->actor.params - 1] >> 8] & (u8)isFrogReturnedFlags[this->actor.params - 1])) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_MINIFROG, this->actor.world.pos.x, this->actor.world.pos.y, @@ -360,10 +360,10 @@ void EnBigslime_Init(Actor* thisx, PlayState* play2) { ACTOR_EN_MINISLIME, 0.0f, 0.0f, 0.0f, 0, 0, 0, i); if (this->minislime[i] == NULL) { for (i = i - 1; i >= 0; i--) { - Actor_MarkForDeath(&this->minislime[i]->actor); + Actor_Kill(&this->minislime[i]->actor); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -2509,7 +2509,7 @@ void EnBigslime_Despawn(EnBigslime* this, PlayState* play) { this->minislime[i]->actor.params = MINISLIME_DESPAWN; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c index e49b743b80..962bb22316 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c @@ -357,7 +357,7 @@ void EnBji01_Init(Actor* thisx, PlayState* play) { func_809CCE98(this, play); break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; } } diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index d4fe409cd7..ea02e9fe7b 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -377,7 +377,7 @@ void func_808715B8(EnBom* this, PlayState* play) { if (this->timer == 0) { func_80123590(play, &this->actor); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if ((this->timer & 1) == 0) { @@ -438,7 +438,7 @@ void EnBom_Update(Actor* thisx, PlayState* play) { } if (Player_GetMask(play) == PLAYER_MASK_GIANT) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } @@ -451,7 +451,7 @@ void EnBom_Update(Actor* thisx, PlayState* play) { if (this->isPowderKeg) { gSaveContext.powderKegTimer = 0; } - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } } else { thisx->gravity = -1.2f; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 21fc9901fa..795bc422d5 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -101,11 +101,11 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play) { !CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) { this->unk_2D6 = this->actor.cutscene; if (this->unk_2D6 == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } func_809C52B4(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -158,7 +158,7 @@ void func_809C4B50(EnBomBowlMan* this) { void func_809C4B6C(EnBomBowlMan* this) { if ((this->unk_29A != ENBOMBOWLMAN_FF00_MINUS1) && (this->path != NULL)) { if (!SubS_CopyPointFromPath(this->path, this->unk_298, &this->unk_2A0)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -369,7 +369,7 @@ void func_809C5310(EnBomBowlMan* this, PlayState* play) { func_809C53A4(this); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -486,10 +486,11 @@ void func_809C5738(EnBomBowlMan* this, PlayState* play) { gSaveContext.save.weekEventReg[84] |= 0x80; gSaveContext.save.weekEventReg[83] &= (u8)~4; ActorCutscene_Stop(this->unk_2D6); - Actor_MarkForDeath(&this->actor); - } else { - func_809C4B6C(this); + Actor_Kill(&this->actor); + return; } + + func_809C4B6C(this); } } } diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index b1b9f8d14d..717c582a6d 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -350,7 +350,7 @@ void EnBomChu_Explode(EnBomChu* this, PlayState* play) { void EnBomChu_WaitForDeath(EnBomChu* this, PlayState* play) { if (this->timer == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c b/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c index a4fc5d484f..49e1f22e6e 100644 --- a/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c +++ b/src/overlays/actors/ovl_En_Bombal/z_en_bombal.c @@ -149,8 +149,11 @@ void func_80C05DE8(EnBombal* this, PlayState* play) { !(gSaveContext.save.weekEventReg[85] & 2)) { ActorCutscene_Stop(this->cutscene); } - Actor_MarkForDeath(&this->actor); - } else if (this->timer < 10) { + Actor_Kill(&this->actor); + return; + } + + if (this->timer < 10) { this->actor.colChkInfo.health = 0; } } diff --git a/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c b/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c index 7d4fbbafb3..1fb8c0cf59 100644 --- a/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c +++ b/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c @@ -105,11 +105,12 @@ void EnBombers_Init(Actor* thisx, PlayState* play) { if (this->unk_2BC == ENBOMBERS_F0_0) { if ((gSaveContext.save.weekEventReg[73] & 0x10) || (gSaveContext.save.weekEventReg[85] & 2)) { - Actor_MarkForDeath(&this->actor); - } else { - this->unk_2BE++; - func_80C03ACC(this); + Actor_Kill(&this->actor); + return; } + + this->unk_2BE++; + func_80C03ACC(this); } else if (((gSaveContext.save.weekEventReg[73] & 0x10) || (gSaveContext.save.weekEventReg[85] & 2)) && (((this->unk_2BE == ENBOMBERS_F_0) && (gSaveContext.save.weekEventReg[76] & 1)) || ((this->unk_2BE == ENBOMBERS_F_1) && (gSaveContext.save.weekEventReg[76] & 2)) || @@ -137,12 +138,13 @@ void EnBombers_Init(Actor* thisx, PlayState* play) { gSaveContext.save.weekEventReg[76] &= (u8)~0x10; } } - Actor_MarkForDeath(&this->actor); - } else { - func_80C042F8(this); + Actor_Kill(&this->actor); + return; } + + func_80C042F8(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c index 9f70629e62..a381509e05 100644 --- a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c +++ b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c @@ -102,7 +102,7 @@ void EnBombers2_Init(Actor* thisx, PlayState* play) { } this->cutscene = this->actor.cutscene; if (this->cutscene == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } func_80C04B40(this); } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 4eb0ea4567..c9c7e623b7 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -305,7 +305,7 @@ void func_808AEFD4(EnBombf* this, PlayState* play) { player->interactRangeActor = NULL; player->stateFlags1 &= ~0x800; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -439,8 +439,11 @@ void EnBombf_Update(Actor* thisx, PlayState* play) { if ((this->actor.scale.x >= 0.01f) && (ENBOMBF_GET(&this->actor) != ENBOMBF_1)) { if (this->actor.depthInWater >= 20.0f) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_IT_BOMB_UNEXPLOSION); - Actor_MarkForDeath(&this->actor); - } else if (this->actor.bgCheckFlags & 0x40) { + Actor_Kill(&this->actor); + return; + } + + if (this->actor.bgCheckFlags & 0x40) { this->actor.bgCheckFlags &= ~0x40; Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMB_DROP_WATER); } diff --git a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c index 48b953ffed..b55762e7d1 100644 --- a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c +++ b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c @@ -152,7 +152,7 @@ void EnBomjima_Init(Actor* thisx, PlayState* play) { if ((gSaveContext.save.weekEventReg[75] & 0x40) || (gSaveContext.save.weekEventReg[73] & 0x10) || (gSaveContext.save.weekEventReg[85] & 2)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c index 300d839582..f1f85077b6 100644 --- a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c +++ b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c @@ -119,35 +119,35 @@ void EnBomjimb_Init(Actor* thisx, PlayState* play) { switch (this->unk_2C8) { case ENBOMJIMB_F_0: if (gSaveContext.save.weekEventReg[11] & 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENBOMJIMB_F_1: if (gSaveContext.save.weekEventReg[11] & 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENBOMJIMB_F_2: if (gSaveContext.save.weekEventReg[11] & 4) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENBOMJIMB_F_3: if (gSaveContext.save.weekEventReg[11] & 8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENBOMJIMB_F_4: if (gSaveContext.save.weekEventReg[11] & 0x10) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -156,7 +156,7 @@ void EnBomjimb_Init(Actor* thisx, PlayState* play) { if ((!(gSaveContext.save.weekEventReg[73] & 0x10) && !(gSaveContext.save.weekEventReg[85] & 2)) || (gSaveContext.save.weekEventReg[75] & 0x40)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 2c68e20f85..b760c44351 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -267,7 +267,7 @@ void func_808A2918(EnBoom* this, PlayState* play) { sp7C->flags &= ~ACTOR_FLAG_2000; } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index 06c5c33b1f..799a1fb269 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -366,7 +366,7 @@ void EnBubble_Wait(EnBubble* this, PlayState* play) { void EnBubble_Pop(EnBubble* this, PlayState* play) { if (EnBubble_Explosion(this, play) > -1) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index 93bc677922..0a636be0d7 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -396,7 +396,7 @@ void func_8091D070(EnButte* this) { void func_8091D090(EnButte* this, PlayState* play) { if (this->unk_24C <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index c457a623e3..e7ee1afb63 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -615,7 +615,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play) { } else if (this->activeTimer != 0) { EnClearTag_UpdateEffects(this, play); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c b/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c index 993076ba8c..4a86843404 100644 --- a/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c +++ b/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c @@ -210,7 +210,7 @@ void EnCne01_Init(Actor* thisx, PlayState* play) { if ((this->enHy.animObjIndex < 0) || (this->enHy.headObjIndex < 0) || (this->enHy.skelUpperObjIndex < 0) || (this->enHy.skelLowerObjIndex < 0)) { - Actor_MarkForDeath(&this->enHy.actor); + Actor_Kill(&this->enHy.actor); } this->enHy.actor.draw = NULL; Collider_InitCylinder(play, &this->enHy.collider); diff --git a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c index 0b909d61f3..26540f16ec 100644 --- a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c +++ b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c @@ -140,7 +140,7 @@ void func_80AFDE00(EnColMan* this, PlayState* play) { void EnColMan_SetHeartPieceCollectedAndKill(EnColMan* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { gSaveContext.save.weekEventReg[56] |= 2; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -183,7 +183,7 @@ void func_80AFDFB4(EnColMan* this, PlayState* play) { Rand_ZeroFloat(50.0f) + 60.0f, 30, Rand_ZeroFloat(5.0f) + 20.0f); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -211,7 +211,7 @@ void func_80AFE25C(EnColMan* this, PlayState* play) { } Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_BOMB_EXPLOSION); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index df60936905..18758bcc98 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -118,7 +118,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) { if (!(gSaveContext.save.weekEventReg[22] & 1) && (CURRENT_DAY != 1) && (EN_COW_TYPE(thisx) == EN_COW_TYPE_ABDUCTED)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index c04462c44b..2cf35e7a4d 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -349,7 +349,7 @@ void EnCrow_Damaged(EnCrow* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT); if (this->actor.parent != NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } EnCrow_SetupDie(this); diff --git a/src/overlays/actors/ovl_En_Dai/z_en_dai.c b/src/overlays/actors/ovl_En_Dai/z_en_dai.c index 6abf4da13e..0404f4ecbb 100644 --- a/src/overlays/actors/ovl_En_Dai/z_en_dai.c +++ b/src/overlays/actors/ovl_En_Dai/z_en_dai.c @@ -531,7 +531,7 @@ void EnDai_Init(Actor* thisx, PlayState* play) { } if (gSaveContext.save.weekEventReg[30] & 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 45777c6810..70bde87540 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -90,10 +90,10 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) { this->actor.flags |= ACTOR_FLAG_8000000; if ((gSaveContext.save.weekEventReg[63] & 0x80) || ((gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Math_Vec3f_Copy(&this->unk_26C, &this->actor.world.pos); @@ -137,7 +137,7 @@ void func_8094373C(EnDaiku* this, s32 arg1) { void func_809437C8(EnDaiku* this) { if ((this->unk_288 != -1) && (this->unk_258 != 0)) { if (!SubS_CopyPointFromPath(this->unk_258, this->unk_25C, &this->unk_26C)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -259,7 +259,7 @@ void EnDaiku_Update(Actor* thisx, PlayState* play) { } if ((this->unk_278 == ENDAIKU_PARAMS_FF_0) && (gSaveContext.save.day == 3) && (gSaveContext.save.isNight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c b/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c index b7b46b5af3..53474f514b 100644 --- a/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c +++ b/src/overlays/actors/ovl_En_Daiku2/z_en_daiku2.c @@ -71,7 +71,7 @@ static ColliderCylinderInit sCylinderInit = { void func_80BE61D0(EnDaiku2* this) { if ((this->unk_27A != -1) && (this->unk_258 != 0)) { if (!SubS_CopyPointFromPath(this->unk_258, this->unk_25C, &this->unk_268)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -93,7 +93,7 @@ void EnDaiku2_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); if (!this->unk_280) { if (day == 3) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -105,7 +105,7 @@ void EnDaiku2_Init(Actor* thisx, PlayState* play) { Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_268); } } else if (day != 3) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index 0f37266e20..990a7328e3 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -544,7 +544,7 @@ void func_808BE4D4(EnDekunuts* this, PlayState* play) { DEKU_FLOWER_PARAMS(DEKU_FLOWER_TYPE_PINK_WITH_INITIAL_BOUNCE)); EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 6.0f, 0, 6, 2, 15, OBJECT_DEKUNUTS, 10, gDekuScrubFlowerFragmentDL); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Dg/z_en_dg.c b/src/overlays/actors/ovl_En_Dg/z_en_dg.c index de2c586e9b..7e540c83a6 100644 --- a/src/overlays/actors/ovl_En_Dg/z_en_dg.c +++ b/src/overlays/actors/ovl_En_Dg/z_en_dg.c @@ -347,7 +347,7 @@ void EnDg_MoveAlongPath(EnDg* this, PlayState* play) { Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -430,7 +430,7 @@ void EnDg_UpdateTextId(EnDg* this) { 0x3538 + (gSaveContext.save.weekEventReg[42 + (this->index / 2)] & 0x0F); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } // As a sanity check, this makes sure the text ID is something in the expected range of 0x3538 to 0x3546. diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c index 506e5eb475..94d0204f22 100644 --- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c +++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c @@ -1145,7 +1145,7 @@ void func_8089D018(EnDinofos* this, PlayState* play) { } if (temp_v0 <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); this->unk_288 = 0; } else { this->unk_288 = temp_v0; diff --git a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c index 346246f860..75537bf86b 100644 --- a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c +++ b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c @@ -242,7 +242,7 @@ void EnDnk_Init(Actor* thisx, PlayState* play) { if (this->unk_28E >= 0) { this->actionFunc = func_80A51648; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->unk_2A2 = D_80A521A0; diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index 685c3a5116..0c2aa8369d 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -222,7 +222,7 @@ void EnDno_Init(Actor* thisx, PlayState* play) { actor = SubS_FindActor(play, actor, ACTORCAT_NPC, ACTOR_EN_DNO); if (actor != NULL) { if (actor != thisx) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); break; } actor = actor->next; @@ -250,7 +250,7 @@ void EnDno_Init(Actor* thisx, PlayState* play) { case EN_DNO_GET_C000_0: func_80A71788(this, play); if (!(gSaveContext.save.weekEventReg[23] & 0x20) || (gSaveContext.save.weekEventReg[93] & 2)) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } else { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, EN_DNO_ANIM_IDLE_WITH_CANDLE, &this->animIndex); @@ -265,13 +265,13 @@ void EnDno_Init(Actor* thisx, PlayState* play) { case EN_DNO_GET_C000_1: if (gSaveContext.save.weekEventReg[23] & 0x20) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } else { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, EN_DNO_ANIM_IDLE, &this->animIndex); this->unk_460 = SubS_FindActor(play, NULL, ACTORCAT_NPC, ACTOR_EN_DNQ); if (this->unk_460 == NULL) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } else { this->actionFunc = func_80A71B68; } diff --git a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c index 63371ee2fa..dea49a276b 100644 --- a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c +++ b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c @@ -300,8 +300,11 @@ void func_80B3D338(EnDnp* this, PlayState* play) { Player* player = GET_PLAYER(play); if ((this->unk_32E != 0) && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) { - Actor_MarkForDeath(&this->actor); - } else if (this->unk_32E == 0) { + Actor_Kill(&this->actor); + return; + } + + if (this->unk_32E == 0) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->unk_32E = 1; } else { @@ -379,7 +382,7 @@ void EnDnp_Init(Actor* thisx, PlayState* play) { } this->actionFunc = func_80B3D2D4; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index f8588614fa..3e4cf3154e 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -502,7 +502,7 @@ void EnDns_Init(Actor* thisx, PlayState* play) { EnDns* this = THIS; if (!func_8092D068(this)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index cd3710a3b7..95ce326452 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -729,7 +729,7 @@ void func_80877E60(EnDodongo* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, 28.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_EAT); if (this->actor.child != NULL) { - Actor_MarkForDeath(this->actor.child); + Actor_Kill(this->actor.child); this->actor.child = NULL; } this->actor.flags &= ~ACTOR_FLAG_10; @@ -931,7 +931,7 @@ void func_808787B0(EnDodongo* this, PlayState* play) { } else { Item_DropCollectible(play, &this->actor.world.pos, ITEM00_RUPEE_PURPLE); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 5d2822d787..ca64711ad0 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -420,7 +420,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) { objectInfo = &sObjInfo[15]; objectBankIndex = Object_GetIndex(&play->objectCtx, objectInfo->objectId); if (objectBankIndex != 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } } diff --git a/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c b/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c index a17ce6193d..61dd4921dc 100644 --- a/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c +++ b/src/overlays/actors/ovl_En_Door_Etc/z_en_door_etc.c @@ -106,7 +106,7 @@ void EnDoorEtc_Init(Actor* thisx, PlayState* play2) { } objectIndex = Object_GetIndex(&play->objectCtx, objectInfo->objectId); if (objectIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->objectIndex = objectIndex; this->dListIndex = objectInfo->dListIndex; @@ -214,7 +214,7 @@ void func_80AC2354(EnDoorEtc* this, PlayState* play) { this->actor.world.pos.z = door->world.pos.z; this->actor.shape.rot.y = door->shape.rot.y; this->actor.world.rot.y = door->world.rot.y; - Actor_MarkForDeath(door); + Actor_Kill(door); this->actionFunc = func_80AC21A0; this->actor.textId = 0x239B; Actor_SetFocus(&this->actor, 70.0f); diff --git a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c index c8b1c98231..870bed49f4 100644 --- a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c +++ b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c @@ -720,7 +720,7 @@ void EnDragon_Dead(EnDragon* this, PlayState* play) { } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnDragon_UpdateDamage(EnDragon* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 7770cc3ec0..343112f49b 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -65,7 +65,7 @@ void func_80A613C8(EnDyExtra* this, PlayState* play) { Math_ApproachF(&this->actor.gravity, 0.0f, 0.1f, 0.005f); if (this->unk14C == 0 || this->unk150 < 0.02f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index aa4768a764..aaa552b456 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -297,7 +297,7 @@ void func_8088CC48(EnElf* this, PlayState* play) { this->unk_25C = 0; this->disappearTimer = 240; if ((this->fairyFlags & 0x400) && Flags_GetCollectible(play, this->unk_260)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -420,7 +420,7 @@ void EnElf_Init(Actor* thisx, PlayState* play2) { break; case 8: - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; case 3: @@ -627,7 +627,7 @@ s32 func_8088DCA4(EnElf* this) { if (this->disappearTimer > -10) { Actor_SetScale(&this->actor, (this->disappearTimer + 10) * 0.008f * 0.1f); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } } @@ -658,7 +658,7 @@ void func_8088DD34(EnElf* this, PlayState* play) { if (this->fairyFlags & 0x400) { Flags_SetCollectible(play, this->unk_260); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -717,7 +717,7 @@ void func_8088E018(EnElf* this, PlayState* play) { parentPos.y += (1500.0f * this->actor.scale.y) + 40.0f; func_8088D660(this, &parentPos, 0.2f); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->unk_258 = Math_FAtan2F(this->actor.velocity.z, this->actor.velocity.x); } @@ -762,7 +762,7 @@ void func_8088E0F0(EnElf* this, PlayState* play) { } if (this->unk_224.y < -10.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -776,7 +776,7 @@ void func_8088E304(EnElf* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_224.y > 200.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c b/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c index 42a4a06d88..07dafa54ff 100644 --- a/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c +++ b/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c @@ -57,7 +57,7 @@ void EnElfbub_Init(Actor* thisx, PlayState* play) { Actor* childActor; if (Flags_GetSwitch(play, ENELFBUB_GET_SWITCHFLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -117,7 +117,7 @@ void EnElfbub_Pop(EnElfbub* this, PlayState* play) { } SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c index 12d804fbaf..11a4b11361 100644 --- a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c +++ b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c @@ -81,21 +81,21 @@ void EnElforg_Init(Actor* thisx, PlayState* play) { switch (STRAY_FAIRY_TYPE(thisx)) { case STRAY_FAIRY_TYPE_CLOCK_TOWN: if (gSaveContext.save.weekEventReg[8] & 0x80) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } break; case STRAY_FAIRY_TYPE_COLLECTIBLE: if (Flags_GetCollectible(play, STRAY_FAIRY_FLAG(thisx))) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } break; default: if (Flags_GetSwitch(play, STRAY_FAIRY_FLAG(thisx))) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } break; @@ -374,7 +374,7 @@ void EnElforg_FreeFloatingFairyFountain(EnElforg* this, PlayState* play) { Actor_SetScale(&this->actor, this->actor.scale.x * 0.9f); if (this->actor.scale.x < 0.001f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -400,7 +400,7 @@ void EnElforg_CirclePlayer(EnElforg* this, PlayState* play) { void EnElforg_FairyCollected(EnElforg* this, PlayState* play) { EnElforg_CirclePlayer(this, play); if (this->timer > 80) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -429,17 +429,18 @@ void EnElforg_ClockTownFairyCollected(EnElforg* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { player->actor.freezeTimer = 0; player->stateFlags1 &= ~0x20000000; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); gSaveContext.save.weekEventReg[8] |= 0x80; ActorCutscene_Stop(0x7C); - } else { - func_800B9010(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); - if (ActorCutscene_GetCurrentIndex() != 0x7C) { - if (ActorCutscene_GetCanPlayNext(0x7C)) { - ActorCutscene_Start(0x7C, &this->actor); - } else { - ActorCutscene_SetIntentToPlay(0x7C); - } + return; + } + + func_800B9010(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); + if (ActorCutscene_GetCurrentIndex() != 0x7C) { + if (ActorCutscene_GetCanPlayNext(0x7C)) { + ActorCutscene_Start(0x7C, &this->actor); + } else { + ActorCutscene_SetIntentToPlay(0x7C); } } } diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index 0305af8ef9..3198f14022 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -40,7 +40,7 @@ void EnEncount1_Init(Actor* thisx, PlayState* play) { EnEncount1* this = THIS; if (this->actor.params <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -128,7 +128,7 @@ void func_808E0954(EnEncount1* this, PlayState* play) { case EN_ENCOUNT1_SKULLFISH_2: if ((this->path != NULL) && (!SubS_CopyPointFromPath(this->path, 0, &spawnPos))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; } diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index 506f147903..cded227d10 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -121,7 +121,7 @@ void EnEncount2_Init(Actor* thisx, PlayState* play) { } if ((this->switchFlag >= 0) && (Flags_GetSwitch(play, this->switchFlag))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -181,7 +181,7 @@ void EnEncount2_Die(EnEncount2* this, PlayState* play) { if (this->switchFlag >= 0) { Flags_SetSwitch(play, this->switchFlag); } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index 508090fd50..82f6838bcc 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -178,7 +178,7 @@ void EnFall_Init(Actor* thisx, PlayState* play) { } if (objectIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->objIndex = objectIndex; @@ -221,7 +221,7 @@ void EnFall_Setup(EnFall* this, PlayState* play) { this->actionFunc = EnFall_StoppedClosedMouthMoon_PerformCutsceneActions; Actor_SetScale(&this->actor, this->scale * 3.0f); if (!(gSaveContext.save.weekEventReg[25] & 2)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; @@ -230,7 +230,7 @@ void EnFall_Setup(EnFall* this, PlayState* play) { Actor_SetScale(&this->actor, this->scale * 3.0f); this->actor.draw = EnFall_Moon_Draw; if (gSaveContext.save.weekEventReg[25] & 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; @@ -280,12 +280,12 @@ void EnFall_Setup(EnFall* this, PlayState* play) { this->actionFunc = EnFall_MoonsTear_Fall; Actor_SetScale(&this->actor, 0.02f); if (!(play->actorCtx.flags & ACTORCTX_FLAG_1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } moon = EnFall_MoonsTear_GetTerminaFieldMoon(play); this->actor.child = moon; if (moon == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; diff --git a/src/overlays/actors/ovl_En_Famos/z_en_famos.c b/src/overlays/actors/ovl_En_Famos/z_en_famos.c index b6b93aded4..4f8f1928f0 100644 --- a/src/overlays/actors/ovl_En_Famos/z_en_famos.c +++ b/src/overlays/actors/ovl_En_Famos/z_en_famos.c @@ -723,7 +723,7 @@ void EnFamos_DeathFade(EnFamos* this, PlayState* play) { if (enBom != NULL) { enBom->parent = NULL; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index ba43ec2a4b..8a9c2ac554 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -411,7 +411,7 @@ void EnFirefly_Die(EnFirefly* this, PlayState* play) { if (this->timer == 0) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xA0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 0479ba261c..dc0b527316 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -520,7 +520,7 @@ void func_8091E880(Actor* thisx, PlayState* play) { } } else if ((this->unk_240 <= 0) && (this->actor.params == ENFISH_0) && (this->actor.floorHeight < BGCHECK_Y_MIN + 10)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -582,8 +582,11 @@ void func_8091EAF0(Actor* thisx, PlayState* play) { } if (this->unk_240 <= 0) { - Actor_MarkForDeath(&this->actor); - } else if (this->unk_240 <= 60) { + Actor_Kill(&this->actor); + return; + } + + if (this->unk_240 <= 60) { if (sp40 & 4) { this->actor.draw = EnFish_Draw; } else { @@ -655,7 +658,7 @@ void func_8091ED70(Actor* thisx, PlayState* play) { } if (this->unk_240 <= 0) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } } @@ -688,7 +691,7 @@ void func_8091EFE8(Actor* thisx, PlayState* play) { s16 sp2E; if (sp3C == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -878,10 +881,11 @@ void func_8091F5A4(Actor* thisx, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actor.parent = NULL; if (this->actor.params == ENFISH_0) { - Actor_MarkForDeath(&this->actor); - } else { - func_8091D904(this); + Actor_Kill(&this->actor); + return; } + + func_8091D904(this); } else if (func_8091DDF4(this, play)) { Actor_PickUp(&this->actor, play, GI_MAX, 80.0f, 25.0f); } @@ -892,7 +896,7 @@ void func_8091F830(Actor* thisx, PlayState* play) { EnFish* this = THIS; if (this->actor.params == ENFISH_1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c index a0575eb9ad..97ce121270 100644 --- a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c +++ b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c @@ -527,7 +527,7 @@ void func_80B2951C(EnFish2* this) { this->unk_2B4 = 10; this->actor.speedXZ = 3.0f; - Actor_MarkForDeath(this->unk_350); + Actor_Kill(this->unk_350); this->unk_350 = NULL; D_80B2B2F4 = &this->actor; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_M_EAT); @@ -806,7 +806,7 @@ void func_80B2A094(EnFish2* this, PlayState* play) { if (D_80B2B2EC != 0) { D_80B2B2EC++; if (D_80B2B2EC > 200) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); ActorCutscene_Stop(this->unk_2BA[0]); return; } @@ -863,7 +863,7 @@ void func_80B2A23C(EnFish2* this, PlayState* play) { D_80B2B2E0 = D_80B2B2EC = D_80B2B2E4 = 0; D_80B2B2F4 = NULL; ActorCutscene_Stop(this->unk_2BA[0]); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index d940a09599..0af2c8f61c 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -3865,7 +3865,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { D_8090CCF0 = this->unk_1A4; D_809171D0 = this->unk_148; D_809171D2 = D_80917206; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if ((this->unk_148 == 0) && (D_809171D0 == 0) && ((s16)this->unk_1A4 < (s16)D_8090CCF0)) { this->unk_1CD = 1; diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 92330d25a3..48f694e8af 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -178,7 +178,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { &play->actorCtx, play, ACTOR_EN_FLOORMAS, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, params + 0x10, -1, this->actor.unk20, NULL); if (this->actor.parent == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -186,8 +186,8 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, params + 0x10, -1, this->actor.unk20, NULL); if (this->actor.child == NULL) { - Actor_MarkForDeath(this->actor.parent); - Actor_MarkForDeath(&this->actor); + Actor_Kill(this->actor.parent); + Actor_Kill(&this->actor); return; } @@ -898,7 +898,7 @@ void func_808D2A20(EnFloormas* this) { if ((parent->actionFunc == func_808D2AA8) && (child->actionFunc == func_808D2AA8)) { func_808D2AB8(parent); func_808D2AB8(child); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->actor.draw = NULL; this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_10); @@ -917,7 +917,7 @@ void func_808D2AB8(EnFloormas* this) { } void func_808D2AF4(EnFloormas* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_808D2B18(EnFloormas* this) { diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index a8276e6494..5ca2e8c22a 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -30,10 +30,11 @@ void EnFr_Init(Actor* thisx, PlayState* play) { EnFr* this = THIS; if (Flags_GetSwitch(play, ENFR_GET_SWITCHFLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); - } else { - this->actor.targetMode = ENFR_GET_TARGETMODE(&this->actor); + Actor_Kill(&this->actor); + return; } + + this->actor.targetMode = ENFR_GET_TARGETMODE(&this->actor); } void EnFr_Destroy(Actor* thisx, PlayState* play) { @@ -43,8 +44,11 @@ void EnFr_Update(Actor* thisx, PlayState* play) { EnFr* this = THIS; if (Flags_GetSwitch(play, ENFR_GET_SWITCHFLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); - } else if (this->actor.xyzDistToPlayerSq < SQ(IREG(29))) { + Actor_Kill(&this->actor); + return; + } + + if (this->actor.xyzDistToPlayerSq < SQ(IREG(29))) { this->actor.flags &= ~ACTOR_FLAG_40000000; } else { this->actor.flags |= ACTOR_FLAG_40000000; diff --git a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c index 45206159e2..0cc5fb0269 100644 --- a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c +++ b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c @@ -1417,7 +1417,7 @@ void EnFsn_Init(Actor* thisx, PlayState* play) { EnFsn_InitShop(this, play); } else { if ((gSaveContext.save.weekEventReg[33] & 8) || (gSaveContext.save.weekEventReg[79] & 0x40)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } Collider_InitCylinder(play, &this->collider); diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index c0be813614..7d1166ef27 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -274,7 +274,7 @@ void func_80961E88(PlayState* play) { Actor* explosive = play->actorCtx.actorLists[ACTORCAT_EXPLOSIVES].first; while (explosive != NULL) { - Actor_MarkForDeath(explosive); + Actor_Kill(explosive); explosive = explosive->next; } } diff --git a/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c b/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c index a2fc00b223..1a51d0ec7f 100644 --- a/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c +++ b/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c @@ -100,7 +100,7 @@ void EnFuKago_Init(Actor* thisx, PlayState* play) { } if (npc == NULL) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -342,7 +342,7 @@ void func_80AD0288(EnFuKago* this, PlayState* play) { scale->z = scale->x; scale->y = scale->x; if (scale->x == 0.0f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c index 19aa9dd2a8..f4055c113d 100644 --- a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c +++ b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c @@ -92,7 +92,7 @@ void EnFuMato_Init(Actor* thisx, PlayState* play) { } if (actor == NULL) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -192,7 +192,7 @@ void func_80ACE718(EnFuMato* this, PlayState* play) { Vec3f sp30 = { 0.0f, 2.0f, 0.0f }; func_800B3030(play, &this->dyna.actor.world.pos, &sp3C, &sp30, 20, 40, 2); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } @@ -352,7 +352,7 @@ void func_80ACEFD8(EnFuMato* this, PlayState* play) { Math_SmoothStepToF(&scale->x, 0.0f, 0.1f, 0.005f, 0.005f); scale->y = scale->z = scale->x; if (scale->x == 0.0f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 58d5a6f5fc..9f2281b60c 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -663,7 +663,7 @@ void func_809336C0(EnFz* this, PlayState* play) { void func_80933760(EnFz* this, PlayState* play) { if (this->unk_BCA == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c b/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c index e011933787..c8b2c7ee3a 100644 --- a/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c +++ b/src/overlays/actors/ovl_En_Gamelupy/z_en_gamelupy.c @@ -149,7 +149,7 @@ void func_80AF6A78(EnGamelupy* this, PlayState* play) { Player* player = GET_PLAYER(play); if (this->unk_19C > 30) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_19C++; this->actor.world.pos = player->actor.world.pos; diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c index 45d6661eb6..0c7a74793e 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c @@ -652,25 +652,26 @@ void func_80B10A48(EnGb2* this, PlayState* play) { switch (ENGB2_GET_7(&this->actor)) { case ENGB2_7_0: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case ENGB2_7_1: ActorCutscene_Stop(this->unk_282[this->unk_290]); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case ENGB2_7_2: ActorCutscene_Stop(this->unk_282[this->unk_290]); if (this->unk_26E == 0x14FB) { Flags_SetSwitch(play, ENGB2_GET_7F8(&this->actor)); - Actor_MarkForDeath(&this->actor); - } else { - this->actor.draw = NULL; - this->unk_26C |= 0x100; - this->actor.flags &= ~ACTOR_FLAG_1; - this->actionFunc = func_80B111AC; + Actor_Kill(&this->actor); + return; } + + this->actor.draw = NULL; + this->unk_26C |= 0x100; + this->actor.flags &= ~ACTOR_FLAG_1; + this->actionFunc = func_80B111AC; break; } } @@ -869,7 +870,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { EnGb2* this = THIS; if (func_80B0F660(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -885,9 +886,9 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { switch (ENGB2_GET_7(&this->actor)) { case ENGB2_7_0: if (gSaveContext.save.weekEventReg[54] & 0x80) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if (gSaveContext.save.weekEventReg[52] & 0x20) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (gSaveContext.save.entrance == ENTRANCE(GHOST_HUT, 1)) { @@ -910,12 +911,12 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { case ENGB2_7_1: if ((play->curSpawn == 1) || (gSaveContext.save.weekEventReg[80] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (Flags_GetSwitch(play, ENGB2_GET_7F8(thisx))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -929,13 +930,13 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { this->unk_290 = 0; this->unk_282[0] = this->actor.cutscene; if (Flags_GetSwitch(play, ENGB2_GET_7F8(thisx))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (Flags_GetClear(play, 2) && Flags_GetClear(play, 3) && Flags_GetClear(play, 4) && Flags_GetClear(play, 5)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -952,7 +953,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index c8e85a3aca..b5aaf2cdec 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -308,7 +308,7 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play) { break; case 7: - Actor_MarkForDeath(&this->picto.actor); + Actor_Kill(&this->picto.actor); break; // Twister cutscene diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c index 1766b8e322..de6d5e70ed 100644 --- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c +++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c @@ -658,7 +658,7 @@ void func_80BB2B1C(EnGeg* this, PlayState* play) { if (ActorCutscene_GetCanPlayNext(this->unk_498)) { gSaveContext.save.weekEventReg[37] |= 8; if (this->actor.child != NULL) { - Actor_MarkForDeath(this->actor.child); + Actor_Kill(this->actor.child); } this->unk_230 |= 0x10; ActorCutscene_StartAndSetFlag(this->unk_498, &this->actor); @@ -839,7 +839,7 @@ void func_80BB3318(EnGeg* this, PlayState* play) { if (ActorCutscene_GetCurrentIndex() != this->unk_49C[7]) { func_800AEF44(Effect_GetByIndex(this->unk_4DC)); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); @@ -862,7 +862,7 @@ void EnGeg_Init(Actor* thisx, PlayState* play) { s32 sp34[] = { 0x3E, 0xF64 }; if (gSaveContext.save.weekEventReg[61] & 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -879,7 +879,7 @@ void EnGeg_Init(Actor* thisx, PlayState* play) { if (this->actor.update != NULL) { this->unk_248 = Object_GetIndex(&play->objectCtx, OBJECT_OF1D_MAP); if (this->unk_248 < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Gg/z_en_gg.c b/src/overlays/actors/ovl_En_Gg/z_en_gg.c index e2ebab0d5e..a4bfc759aa 100644 --- a/src/overlays/actors/ovl_En_Gg/z_en_gg.c +++ b/src/overlays/actors/ovl_En_Gg/z_en_gg.c @@ -319,7 +319,7 @@ void func_80B35634(EnGg* this, PlayState* play) { break; case 8: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; default: @@ -647,7 +647,7 @@ void EnGg_Init(Actor* thisx, PlayState* play) { EnGg* this = THIS; if (INV_CONTENT(ITEM_MASK_GORON) == ITEM_MASK_GORON) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c index 47eac30512..623e28836c 100644 --- a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c +++ b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c @@ -356,12 +356,12 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) { EnGg2* this = THIS; if (INV_CONTENT(ITEM_MASK_GORON) == ITEM_MASK_GORON) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (gSaveContext.save.weekEventReg[91] & 0x10) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -395,7 +395,7 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) { Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0); this->actionFunc = func_80B3B05C; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (play->sceneId == SCENE_10YUKIYAMANOMURA) { if (!(gSaveContext.save.weekEventReg[20] & 4) && (gSaveContext.save.weekEventReg[20] & 8) && @@ -405,13 +405,13 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) { Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0); this->actionFunc = func_80B3B05C; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { gSaveContext.save.weekEventReg[20] &= (u8)~4; gSaveContext.save.weekEventReg[20] &= (u8)~8; gSaveContext.save.weekEventReg[20] &= (u8)~0x10; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Giant/z_en_giant.c b/src/overlays/actors/ovl_En_Giant/z_en_giant.c index 10951f76d3..50aadad377 100644 --- a/src/overlays/actors/ovl_En_Giant/z_en_giant.c +++ b/src/overlays/actors/ovl_En_Giant/z_en_giant.c @@ -184,7 +184,7 @@ void EnGiant_Init(Actor* thisx, PlayState* play) { if (GIANT_TYPE_IS_CLOCK_TOWER_SUCCESS(type)) { if (!(gSaveContext.save.weekEventReg[25] & 2)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -210,7 +210,7 @@ void EnGiant_Init(Actor* thisx, PlayState* play) { this->actor.terminalVelocity = 0.0f; this->actor.gravity = 0.0f; if (EnGiant_IsImprisoned(this)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index 74486b30cf..477809c4df 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -160,14 +160,14 @@ void EnGirlA_InitObjIndex(EnGirlA* this, PlayState* play) { s16 params = this->actor.params; //! @bug: Condition is impossible, && should be an || - if (params >= SI_MAX && params < SI_POTION_RED_1) { - Actor_MarkForDeath(&this->actor); + if ((params >= SI_MAX) && (params < SI_POTION_RED_1)) { + Actor_Kill(&this->actor); return; } this->objIndex = Object_GetIndex(&play->objectCtx, sShopItemEntries[params].objectId); if (this->objIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 601faff4b3..61ae3e91a1 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -810,7 +810,7 @@ void func_80B51EA4(EnGk* this, PlayState* play) { if (func_80B50C78(this, this->path, this->unk_1EC)) { if (this->unk_1EC >= (this->path->count - 1)) { ActorCutscene_Stop(this->unk_318); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_1EC++; } @@ -1020,7 +1020,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); if (play->sceneId == SCENE_17SETUGEN2) { if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_318 = this->actor.cutscene; this->path = SubS_GetPathByIndex(play, ENGK_GET_F0(&this->actor), 0xF); @@ -1036,10 +1036,10 @@ void EnGk_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80B51760; } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (ENGK_GET_F(&this->actor) == ENGK_F_2) { if (!(gSaveContext.save.weekEventReg[22] & 4)) { @@ -1048,7 +1048,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) { this->actor.flags |= ACTOR_FLAG_10; this->actor.flags &= ~ACTOR_FLAG_1; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (!(gSaveContext.save.weekEventReg[22] & 4)) { this->unk_2E4 = 0; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index c85815ee74..23406fe7a0 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -1665,7 +1665,7 @@ void EnGm_Init(Actor* thisx, PlayState* play) { EnGm* this = THIS; if (func_8094DEE0(this, play, ACTORCAT_NPC, ACTOR_EN_GM)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 8692fbba1c..e1659259f8 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -1380,7 +1380,7 @@ void func_80A14430(EnGo* this, PlayState* play) { func_80A14018(this, play); this->actionFunc = func_80A149B0; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1390,7 +1390,7 @@ void func_80A1449C(EnGo* this, PlayState* play) { func_80A14104(this, play); this->actionFunc = func_80A149B0; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1505,7 +1505,7 @@ void func_80A14798(EnGo* this, PlayState* play) { break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; } } diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 1f173114de..c6ef6a97c5 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -965,12 +965,12 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) { func_8093E9B0(this, play); if (sp28 == 0x7F8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (sp2C->count < 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -1418,7 +1418,7 @@ void func_80942604(EnGoroiwa* this, PlayState* play) { if (this->unk_1C8 > 0) { this->unk_1C8--; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c b/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c index aa2ce49157..3644291392 100644 --- a/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c +++ b/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c @@ -782,8 +782,8 @@ void EnGrasshopper_Fall(EnGrasshopper* this, PlayState* play) { s32 isUnderWater = false; this->actor.shape.rot.y += 0x1388; - if ((this->actor.floorHeight <= -32000.0f) || (this->actor.floorHeight >= 32000.0f)) { - Actor_MarkForDeath(&this->actor); + if ((this->actor.floorHeight <= BGCHECK_Y_MIN) || (this->actor.floorHeight >= BGCHECK_Y_MAX)) { + Actor_Kill(&this->actor); return; } @@ -840,7 +840,7 @@ void EnGrasshopper_Fall(EnGrasshopper* this, PlayState* play) { SoundSource_PlaySfxEachFrameAtFixedWorldPos(play, &this->actor.world.pos, 10, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0x60); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 3927305ad0..fb9ed510cd 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -871,7 +871,7 @@ s32 func_809995A4(EnGs* this, PlayState* play) { if (this->actor.playerHeightRel < -12000.0f) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.world.rot.y, 0, 0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); sp7C = 0; } } @@ -881,7 +881,7 @@ s32 func_809995A4(EnGs* this, PlayState* play) { void func_80999A8C(EnGs* this, PlayState* play) { if (this->unk_1D4-- <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c b/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c index a57effdcc2..2386347800 100644 --- a/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c +++ b/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c @@ -88,12 +88,12 @@ void EnGuruguru_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; this->actionFunc = EnGuruguru_DoNothing; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (this->actor.params == 1) { func_80BC6E10(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -321,11 +321,11 @@ void EnGuruguru_Update(Actor* thisx, PlayState* play) { if (!gSaveContext.save.isNight) { if (this->actor.params == 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (this->actor.params == 0 || this->actor.params == 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c index 6b354dd94c..200f7cba82 100644 --- a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c +++ b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c @@ -305,7 +305,7 @@ void func_80B236C8(EnHanabi* this, PlayState* play) { void func_80B23894(EnHanabi* this, PlayState* play) { func_80B236C8(this, play); if (func_80B22F34(this->unk_148) == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c b/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c index b69429d1af..2831e53171 100644 --- a/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c +++ b/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c @@ -74,7 +74,7 @@ void EnHeishi_Init(Actor* thisx, PlayState* play) { this->shouldSetHeadRotation = 1; if (!(gSaveContext.save.weekEventReg[63] & 0x80) && !((gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { this->colliderCylinder.dim.radius = 30; @@ -82,7 +82,7 @@ void EnHeishi_Init(Actor* thisx, PlayState* play) { this->colliderCylinder.dim.yShift = 0; if ((gSaveContext.save.weekEventReg[63] & 0x80) || ((gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -152,22 +152,23 @@ void EnHeishi_Update(Actor* thisx, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; if ((this->paramsCopy != 0) && (gSaveContext.save.day == 3) && gSaveContext.save.isNight) { - Actor_MarkForDeath(&this->actor); - } else { - this->actionFunc(this, play); - Actor_MoveWithGravity(&this->actor); - Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f, 29); - Actor_SetScale(&this->actor, 0.01f); - if (this->shouldSetHeadRotation) { - EnHeishi_SetHeadRotation(this); - } - - Actor_SetFocus(&this->actor, 60.0f); - Math_SmoothStepToS(&this->headRotX, this->headRotXTarget, 1, 3000, 0); - Math_SmoothStepToS(&this->headRotY, this->headRotYTarget, 1, 1000, 0); - Collider_UpdateCylinder(&this->actor, &this->colliderCylinder); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base); + Actor_Kill(&this->actor); + return; } + + this->actionFunc(this, play); + Actor_MoveWithGravity(&this->actor); + Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f, 29); + Actor_SetScale(&this->actor, 0.01f); + if (this->shouldSetHeadRotation) { + EnHeishi_SetHeadRotation(this); + } + + Actor_SetFocus(&this->actor, 60.0f); + Math_SmoothStepToS(&this->headRotX, this->headRotXTarget, 1, 3000, 0); + Math_SmoothStepToS(&this->headRotY, this->headRotYTarget, 1, 1000, 0); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base); } s32 EnHeishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.c b/src/overlays/actors/ovl_En_Hg/z_en_hg.c index 07b2564873..3e089d185b 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.c +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.c @@ -126,7 +126,7 @@ void EnHg_Init(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit2); if ((gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.weekEventReg[52] & 0x20)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.targetMode = 1; this->actor.colChkInfo.health = 0; @@ -304,7 +304,7 @@ void func_80BCF95C(EnHg* this, PlayState* play) { break; case 6: gSaveContext.save.weekEventReg[75] |= 0x20; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; } } else { diff --git a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c index 81cb9850cb..04434510b0 100644 --- a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c +++ b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c @@ -95,12 +95,12 @@ void EnHiddenNuts_Init(Actor* thisx, PlayState* play) { } if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->unk_21E == 0x1F) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -313,7 +313,7 @@ void func_80BDBA28(EnHiddenNuts* this, PlayState* play) { this->unk_208 = 1; if ((this->path != NULL) && !SubS_CopyPointFromPath(this->path, this->unk_208, &this->unk_20C)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.speedXZ = 2.0f; @@ -377,7 +377,7 @@ void func_80BDBB48(EnHiddenNuts* this, PlayState* play) { if (this->unk_208 >= this->path->count) { func_80BDBE70(this, play); } else if ((this->path != NULL) && !SubS_CopyPointFromPath(this->path, this->unk_208, &this->unk_20C)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -402,7 +402,7 @@ void func_80BDBED4(EnHiddenNuts* this, PlayState* play) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); EffectSsHahen_SpawnBurst(play, &sp38, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c index 46a52a9faf..6d02b6c33a 100644 --- a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c +++ b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c @@ -330,7 +330,7 @@ void func_80C204F0(EnHintSkb* this, PlayState* play) { } Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x10); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_80C20540(EnHintSkb* this) { diff --git a/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c b/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c index 17dfeb34ec..cf9421c571 100644 --- a/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c +++ b/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c @@ -57,7 +57,7 @@ void EnHitTag_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); Collider_UpdateCylinder(&this->actor, &this->collider); if (Flags_GetSwitch(play, ENHITTAG_GET_SWITCHFLAG(thisx))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -73,7 +73,7 @@ void EnHitTag_WaitForHit(EnHitTag* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { play_sound(NA_SE_SY_GET_RUPY); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); dropLocation.x = this->actor.world.pos.x; dropLocation.y = this->actor.world.pos.y; dropLocation.z = this->actor.world.pos.z; diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 0e58e2b858..8f634369b8 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -155,7 +155,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) { u32 zActorBitmask = D_801AED48[EN_HOLL_GET_Z_ACTOR_BITMASK_INDEX(&this->actor)]; if (!(actorCtxBitmask & zActorBitmask)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this == sInstancePlayingSound) { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index d822ba6748..018ed49713 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -721,7 +721,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->unk_528 = 80.0f; this->boostSpeed = 12; if ((this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_HA)) < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->unk_1EC |= 1; @@ -743,7 +743,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->type = HORSE_TYPE_BANDIT; this->boostSpeed = 12; if ((this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_HA)) < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->unk_1EC |= 1; @@ -751,7 +751,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { } else { this->type = HORSE_TYPE_EPONA; this->boostSpeed = 15; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.params &= ~(ENHORSE_PARAM_DONKEY | ENHORSE_PARAM_4000 | ENHORSE_PARAM_BANDIT); @@ -879,7 +879,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { } else if (thisx->params == ENHORSE_14) { func_808846F0(this, play); if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (thisx->params == ENHORSE_16) { func_8087C9F8(this); @@ -3271,7 +3271,7 @@ void func_80884604(EnHorse* this, PlayState* play, CsCmdActorAction* action) { } void func_808846B4(EnHorse* this, PlayState* play, CsCmdActorAction* action) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_808846DC(EnHorse* this, PlayState* play, CsCmdActorAction* action) { diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 99d4eca14f..3cfa65ddb0 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -60,7 +60,7 @@ s32 func_808F8AA0(EnHorseGameCheck* this, PlayState* play) { DynaPolyActor_Init(&this->dyna, 0); if (GET_RACE_FLAGS != RACE_FLAG_START) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return false; } @@ -117,7 +117,7 @@ s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) { this->unk_174 = 0; if (GET_RACE_FLAGS != RACE_FLAG_START) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return false; } diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 92f73dac51..9fc9e088d6 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -694,7 +694,7 @@ void EnIk_Die(EnIk* this, PlayState* play) { if (this->timer == 0) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0); ActorCutscene_Stop(this->actor.cutscene); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } else if (Animation_OnFrame(&this->skelAnime, 23.0f)) { diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index e5f56d8572..5d5cf54399 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -1421,7 +1421,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_KANBAN, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 0xF); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_0); this->actionFunc = func_808F5A94; @@ -1429,14 +1429,14 @@ void EnIn_Init(Actor* thisx, PlayState* play) { } } else { if (gSaveContext.save.weekEventReg[52] & 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_7); this->actionFunc = func_808F5B58; } } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } else { diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index e985f6b5cf..78aa53464e 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -310,7 +310,7 @@ void func_8091B2D8(EnInsect* this, PlayState* play) { this->actor.draw = EnInsect_Draw; } else if (this->unk_312 == 0) { if (this->unk_30C & 4) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -355,7 +355,7 @@ void func_8091B440(EnInsect* this, PlayState* play) { } if (this->unk_312 <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -436,7 +436,7 @@ void func_8091B984(EnInsect* this, PlayState* play) { } if (this->unk_312 <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index a0dbf7ca28..f40475f276 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -1688,7 +1688,7 @@ void EnInvadepoh_InitAlien(EnInvadepoh* this, PlayState* play) { } this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_UCH); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1698,7 +1698,7 @@ void EnInvadepoh_InitParentCow(EnInvadepoh* this, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_INVADEPOH, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0x30); this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_COW); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1707,7 +1707,7 @@ void EnInvadepoh_InitChildCow(EnInvadepoh* this, PlayState* play) { this->actor.update = func_80B481C4; this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_COW); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1743,27 +1743,27 @@ void EnInvadepoh_InitRomani(EnInvadepoh* this, PlayState* play) { this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_MA1); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (temp == 5) { if (gSaveContext.save.weekEventReg[22] & 1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (temp == 7) { if (gSaveContext.save.time < CLOCK_TIME(6, 0) && gSaveContext.save.time >= CLOCK_TIME(2, 15)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (temp != 8) { if (temp == 9) { if (gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 6)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (temp == 0xC) { if (!(gSaveContext.save.weekEventReg[22] & 1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } D_80B503F4 = this; } @@ -1784,7 +1784,7 @@ void func_80B468B4(EnInvadepoh* this, PlayState* play) { this->actor.world.pos.y += 1500.0f; func_80B49628(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1799,7 +1799,7 @@ void EnInvadepoh_InitDog(EnInvadepoh* this, PlayState* play) { ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 24.0f); this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_DOG); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1815,10 +1815,10 @@ void EnInvadepoh_InitCremia(EnInvadepoh* this, PlayState* play) { ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 18.0f); this->bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_MA2); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (!(gSaveContext.save.weekEventReg[22] & 1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } D_80B503F8 = this; } @@ -2297,7 +2297,7 @@ void func_80B47BAC(Actor* thisx, PlayState* play) { func_80B47568(this); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -2313,7 +2313,7 @@ void func_80B47D30(Actor* thisx, PlayState* play) { thisx->gravity = 0.0f; func_80B47830(this); } else if ((this->actionFunc == func_80B474DC) || (this->actionFunc == func_80B473E4)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (this->collider.base.acFlags & AC_HIT) { @@ -2376,7 +2376,7 @@ void func_80B48060(Actor* thisx, PlayState* play) { MtxF unkMtx; if (D_80B503F0 == NULL || this->actor.parent == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -2416,7 +2416,7 @@ void func_80B4827C(Actor* thisx, PlayState* play) { EnInvadepoh* this = THIS; if (D_80B503F0 == NULL || this->actor.parent == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -2534,7 +2534,7 @@ void func_80B4873C(Actor* thisx, PlayState* play) { AlienBehaviorInfo* substruct = &this->behaviorInfo; if (this->actor.parent == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc(this, play); @@ -2940,7 +2940,7 @@ void func_80B4994C(EnInvadepoh* this, PlayState* play) { if (this->actionTimer > 0) { this->actionTimer--; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -3030,7 +3030,7 @@ void func_80B49C38(EnInvadepoh* this, PlayState* play) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } if (this->clockTime >= 0.9999f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -3103,7 +3103,7 @@ void func_80B49F88(Actor* thisx, PlayState* play) { this->actor.draw = func_80B4E324; func_80B49BD0(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -3654,7 +3654,7 @@ void func_80B4B8BC(Actor* thisx, PlayState* play) { } else if (D_80B4E940 == 1) { this->actor.update = func_80B4BA30; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (!this) {} } } @@ -3788,7 +3788,7 @@ void func_80B4BC4C(EnInvadepoh* this, PlayState* play) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } if (gSaveContext.save.time > CLOCK_TIME(20, 15)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if ((temp_t6 != NULL) && (temp_t6->actionFunc == func_80B4CB0C)) { func_80B4C1BC(this); } @@ -3892,7 +3892,7 @@ void func_80B4C3A0(Actor* thisx, PlayState* play) { this->actor.draw = func_80B4E7BC; func_80B4BBE0(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -4003,7 +4003,7 @@ void func_80B4C730(EnInvadepoh* this, PlayState* play) { } if (this->clockTime >= 0.9999f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -4101,7 +4101,7 @@ void func_80B4CE54(Actor* thisx, PlayState* play) { this->actor.draw = func_80B4E324; func_80B4C6C8(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -4168,7 +4168,7 @@ void func_80B4D290(EnInvadepoh* this, PlayState* play) { f32 sp28; if (D_80B503F0 == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -4190,7 +4190,7 @@ void func_80B4D290(EnInvadepoh* this, PlayState* play) { } if (sp28 < 5.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -4257,7 +4257,7 @@ void func_80B4D480(EnInvadepoh* this, PlayState* play) { } if ((this->actionTimer <= 0) || sp2C) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c b/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c index d7bda51803..581d4d9b10 100644 --- a/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c +++ b/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c @@ -86,7 +86,7 @@ void func_80C2590C(EnInvisibleRuppe* this, PlayState* play) { } void func_80C259E8(EnInvisibleRuppe* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnInvisibleRuppe_Init(Actor* thisx, PlayState* play) { @@ -100,7 +100,7 @@ void EnInvisibleRuppe_Init(Actor* thisx, PlayState* play) { } if ((this->unk_190 >= 0) && Flags_GetSwitch(play, this->unk_190)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 5ebc15a029..3bc8a860a3 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -398,7 +398,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) { func_8095D6E0(&this->actor, play); if ((sp34 == 1) && Flags_GetSwitch(play, ENISHI_GET_FE00(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -415,7 +415,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) { this->actor.shape.yOffset = D_8095F6C0[sp34]; if ((sp30 == 0) && !func_8095D758(this, play, 0)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -425,7 +425,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) { this->unk_196 = Object_GetIndex(&play->objectCtx, D_8095F6E8[ENISHI_GET_8(&this->actor)]); if (this->unk_196 < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -490,7 +490,7 @@ void func_8095E660(EnIshi* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, D_8095F6D4[sp38], D_8095F6D0[sp38]); D_8095F6D8[sp38](&this->actor, play); D_8095F6E0[sp38](this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -604,7 +604,7 @@ void func_8095EBDC(EnIshi* this, PlayState* play) { Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -682,9 +682,9 @@ void func_8095F180(EnIshi* this) { void func_8095F194(EnIshi* this, PlayState* play) { if (this->actor.cutscene < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if (ActorCutscene_GetCurrentIndex() != this->actor.cutscene) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c b/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c index ced184e682..fcb5f465b0 100644 --- a/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c +++ b/src/overlays/actors/ovl_En_Jc_Mato/z_en_jc_mato.c @@ -111,7 +111,7 @@ void EnJcMato_SetupIdle(EnJcMato* this) { void EnJcMato_Idle(EnJcMato* this, PlayState* play) { if (this->hitFlag) { if (DECR(this->despawnTimer) == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index 60ebb2474b..3b3ce16848 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -632,7 +632,7 @@ void EnJg_LullabyIntroCutsceneAction(EnJg* this, PlayState* play) { case 1: this->cutsceneAnimIndex = EN_JG_ANIM_CUTSCENE_IDLE; if (this->drum != NULL) { - Actor_MarkForDeath(this->drum); + Actor_Kill(this->drum); this->drum = NULL; } break; diff --git a/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c b/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c index f88e7c074c..d44ed193cb 100644 --- a/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c +++ b/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c @@ -112,7 +112,7 @@ void func_80C13A2C(EnJgameTsn* this, PlayState* play) { s32 i; if (path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } for (i = 0; i < ARRAY_COUNT(this->unk_1D8); i++) { @@ -121,7 +121,7 @@ void func_80C13A2C(EnJgameTsn* this, PlayState* play) { path = &play->setupPathList[path->unk1]; if (path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -130,7 +130,7 @@ void func_80C13A2C(EnJgameTsn* this, PlayState* play) { path = &play->setupPathList[path->unk1]; if (path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->unk_200.points = Lib_SegmentedToVirtual(path->points); diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 457f62d77e..a8a6b5e0bf 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -126,7 +126,7 @@ void EnJs_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80969B5C; func_80968A5C(this); if (func_809692A8(ENJS_GET_TYPE(&this->actor) + 4)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.c b/src/overlays/actors/ovl_En_Kame/z_en_kame.c index c1ea3ae461..4f1f9ea2e8 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c @@ -600,7 +600,7 @@ void func_80AD8388(EnKame* this, PlayState* play) { this->actor.scale.x -= 0.001f; if (this->actor.scale.x <= 0.0f) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x60); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->actor.scale.y = this->actor.scale.x; this->actor.scale.z = this->actor.scale.x; diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 5113c12917..b87b3243eb 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -277,7 +277,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { piece->partFlags = sCutFlags[this->cutType] & this->partFlags; if (piece->partFlags == 0) { - Actor_MarkForDeath(&piece->actor); + Actor_Kill(&piece->actor); return; } @@ -673,7 +673,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { signpost = (EnKanban*)this->actor.parent; if (signpost->partFlags == 0xFFFF) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } phi_f0 = 0.0f; @@ -852,7 +852,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { signpost->invincibilityTimer = 5; if (signpost->partFlags == 0xFFFF) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Matrix_RotateYS(signpost->actor.shape.rot.y, MTXMODE_NEW); @@ -876,7 +876,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { (this->floorRot.z == 0.0f)) { signpost->partFlags |= this->partFlags; signpost->actor.flags |= ACTOR_FLAG_1; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; diff --git a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c index d90bdf93dc..08ec15b142 100644 --- a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c +++ b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c @@ -117,12 +117,12 @@ void EnKendoJs_Init(Actor* thisx, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_KANBAN, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z - 10.0f, this->actor.home.rot.x, this->actor.home.rot.y, this->actor.home.rot.z, 0x10); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); } } else if (ENKENDOJS_GET_FF(&this->actor) == ENKENDOJS_FF_1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4); diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 2ab13422a8..fdeab7aeba 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -385,7 +385,7 @@ void EnKusa_Init(Actor* thisx, PlayState* play) { this->actor.world.rot.y = this->actor.shape.rot.y; } if (!EnKusa_SnapToFloor(this, play, 0.0f)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (EnKusa_GetWaterBox(this, play)) { @@ -394,7 +394,7 @@ void EnKusa_Init(Actor* thisx, PlayState* play) { this->objIndex = Object_GetIndex(&play->objectCtx, objectIds[(KUSA_GET_TYPE(&this->actor))]); if (this->objIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -470,12 +470,12 @@ void EnKusa_WaitForInteract(EnKusa* this, PlayState* play) { } } if (KUSA_GET_TYPE(&this->actor) == ENKUSA_TYPE_BUSH) { - Actor_MarkForDeath(&this->actor); - } else { - EnKusa_SetupCut(this); - this->isCut = true; + Actor_Kill(&this->actor); + return; } + EnKusa_SetupCut(this); + this->isCut = true; } else { if (!(this->collider.base.ocFlags1 & OC1_TYPE_PLAYER) && (this->actor.xzDistToPlayer > 12.0f)) { this->collider.base.ocFlags1 |= OC1_TYPE_PLAYER; @@ -560,7 +560,7 @@ void EnKusa_Fall(EnKusa* this, PlayState* play) { switch (KUSA_GET_TYPE(&this->actor)) { case ENKUSA_TYPE_BUSH: case ENKUSA_TYPE_GRASS: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case ENKUSA_TYPE_REGROWING_GRASS: diff --git a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c index fdf3cc9ac5..064677b3ba 100644 --- a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c +++ b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c @@ -136,7 +136,7 @@ void func_80A5B334(EnKusa2* this, PlayState* play) { if (*ptr != NULL) { if (!Actor_HasParent(&(*ptr)->actor, play)) { - Actor_MarkForDeath(&(*ptr)->actor); + Actor_Kill(&(*ptr)->actor); } *ptr = NULL; } @@ -379,7 +379,7 @@ s32 func_80A5BFD8(EnKusa2* this, PlayState* play) { func_80A5BD14(this, play, (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1000000) ? 1 : 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN); func_80A5BD94(this); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; @@ -878,18 +878,19 @@ void EnKusa2_Init(Actor* thisx, PlayState* play) { } else { Collider_InitCylinder(play, &this->collider); if (!func_80A5BA58(this, play)) { - Actor_MarkForDeath(&this->actor); - } else { - Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); - Collider_UpdateCylinder(&this->actor, &this->collider); - this->actor.colChkInfo.mass = MASS_IMMOVABLE; - this->unk_1CE = D_80A5EAF0 & 7; - D_80A5EAF0++; - this->actor.shape.shadowAlpha = 0; - this->unk_1CF = 255; - this->actor.shape.shadowScale = 1.0f; - func_80A5D7A4(this); + Actor_Kill(&this->actor); + return; } + + Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); + Collider_UpdateCylinder(&this->actor, &this->collider); + this->actor.colChkInfo.mass = MASS_IMMOVABLE; + this->unk_1CE = D_80A5EAF0 & 7; + D_80A5EAF0++; + this->actor.shape.shadowAlpha = 0; + this->unk_1CF = 255; + this->actor.shape.shadowScale = 1.0f; + func_80A5D7A4(this); } } @@ -1096,7 +1097,7 @@ void func_80A5DC98(EnKusa2* this, PlayState* play) { } else if (this->unk_1CA > 0) { this->unk_1CA--; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -1241,7 +1242,7 @@ void func_80A5E210(EnKusa2* this, PlayState* play) { if (this->unk_1B8 != NULL) { this->unk_1B8->unk_28 = func_80A5C718; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1273,7 +1274,7 @@ void func_80A5E4BC(EnKusa2* this, PlayState* play) { this->unk_1CF -= 15; if (this->unk_1CF <= 15) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c index 6fd949febe..cac761db70 100644 --- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c +++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c @@ -120,11 +120,11 @@ void EnLookNuts_Init(Actor* thisx, PlayState* play) { this->switchFlag = -1; } if ((this->switchFlag >= 0) && (Flags_GetSwitch(play, this->switchFlag))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->pathLocation == 0x1F) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c index e42e70ca30..a7c54a7dbe 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c @@ -68,9 +68,10 @@ void EnMFire1_Update(Actor* thisx, PlayState* play) { s32 pad; if (Math_StepToF(&this->timer, 1.0f, 0.2f)) { - Actor_MarkForDeath(&this->actor); - } else { - Collider_UpdateCylinder(&this->actor, &this->collider); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); + Actor_Kill(&this->actor); + return; } + + Collider_UpdateCylinder(&this->actor, &this->collider); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 1fa4589b56..585f56088e 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -136,7 +136,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) { &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); AudioSfx_PlaySfx(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -216,9 +216,12 @@ void EnMThunder_Spin_AttackNoMagic(EnMThunder* this, PlayState* play) { AudioSfx_PlaySfx(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } - Actor_MarkForDeath(&this->actor); - } else if (!(player->stateFlags1 & PLAYER_STATE1_1000)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); + return; + } + + if (!(player->stateFlags1 & PLAYER_STATE1_1000)) { + Actor_Kill(&this->actor); } } @@ -260,7 +263,7 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) { AudioSfx_PlaySfx(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -313,7 +316,7 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) { if (this->actor.child != NULL) { this->actor.child->parent = NULL; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -341,7 +344,7 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) { } if (Play_InCsMode(play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -367,7 +370,7 @@ void EnMThunder_Spin_Attack(EnMThunder* this, PlayState* play) { Player* player = GET_PLAYER(play); if (Math_StepToF(&this->lightColorFrac, 0.0f, 0.0625f)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { Math_SmoothStepToF(&this->actor.scale.x, (s32)this->scaleTarget, 0.6f, 0.8f, 0.0f); Actor_SetScale(&this->actor, this->actor.scale.x); @@ -391,7 +394,7 @@ void EnMThunder_Spin_Attack(EnMThunder* this, PlayState* play) { func_808B5EEC(this, play); if (Play_InCsMode(play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -406,7 +409,7 @@ void EnMThunder_SwordBeam_Attack(EnMThunder* this, PlayState* play) { } if (Math_StepToF(&this->lightColorFrac, 0.0f, 0.05f)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { sp2C = -80.0f * Math_CosS(this->actor.world.rot.x); @@ -441,7 +444,7 @@ void EnMThunder_SwordBeam_Attack(EnMThunder* this, PlayState* play) { void EnMThunder_UnkType_Attack(EnMThunder* this, PlayState* play) { if (Math_StepToF(&this->lightColorFrac, 0.0f, 0.0625f)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { Math_SmoothStepToF(&this->actor.scale.x, (s32)this->scaleTarget, 0.6f, 0.8f, 0.0f); Actor_SetScale(&this->actor, this->actor.scale.x); diff --git a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c index 49d7a06fb5..3c4e52df8a 100644 --- a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c +++ b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c @@ -163,7 +163,7 @@ void EnMaYto_Init(Actor* thisx, PlayState* play) { this->blinkTimer = 100; this->type = EN_MA_YTO_GET_TYPE(&this->actor); if (!EnMaYto_CheckValidSpawn(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c index 5fcf1c7f06..be771eafe1 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c @@ -220,7 +220,7 @@ void EnMaYts_Init(Actor* thisx, PlayState* play) { this->type = EN_MA_YTS_GET_TYPE(thisx); if (!EnMaYts_CheckValidSpawn(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); diff --git a/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c b/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c index 4c7a1ddf85..9bd19d193b 100644 --- a/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c +++ b/src/overlays/actors/ovl_En_Maruta/z_en_maruta.c @@ -317,7 +317,7 @@ void func_80B37428(EnMaruta* this, PlayState* play) { kendoJs->unk_28C--; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -332,7 +332,7 @@ void func_80B374B8(EnMaruta* this) { void func_80B374FC(EnMaruta* this, PlayState* play) { if (this->unk_21E == 40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -476,7 +476,7 @@ void func_80B37A8C(EnMaruta* this) { void func_80B37AA0(EnMaruta* this, PlayState* play) { if (this->actor.scale.y == 0.0f) { if (this->actor.scale.x == 0.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } Math_SmoothStepToF(&this->actor.scale.x, 0.0f, 0.2f, 0.01f, 0.001f); diff --git a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c index 399a8f6596..c162fc4652 100644 --- a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c +++ b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c @@ -116,13 +116,14 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) { if ((this->frogIndex == MINIFROG_YELLOW) || ((gSaveContext.save.weekEventReg[isFrogReturnedFlags[this->frogIndex] >> 8] & (u8)isFrogReturnedFlags[this->frogIndex]))) { - Actor_MarkForDeath(&this->actor); - } else { - this->timer = 30; - this->actionFunc = EnMinifrog_SpawnGrowAndShrink; - this->actor.textId = 0xD81; // "Ah! Don Gero! It has been so long." - this->actor.colChkInfo.mass = 30; + Actor_Kill(&this->actor); + return; } + + this->timer = 30; + this->actionFunc = EnMinifrog_SpawnGrowAndShrink; + this->actor.textId = 0xD81; // "Ah! Don Gero! It has been so long." + this->actor.colChkInfo.mass = 30; } else { // Frogs in mountain village if (this->frogIndex == MINIFROG_YELLOW) { this->actor.textId = 0; @@ -293,7 +294,7 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, PlayState* play) { } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } diff --git a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c index cdf3ad957f..68bb607821 100644 --- a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c +++ b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c @@ -621,7 +621,7 @@ void EnMinislime_SetupDespawn(EnMinislime* this) { } void EnMinislime_Despawn(EnMinislime* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnMinislime_SetupMoveToGekko(EnMinislime* this) { diff --git a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c index c8cc1abb1d..c209b76843 100644 --- a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c +++ b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c @@ -487,7 +487,7 @@ void func_80A4EF74(EnMkk* this, PlayState* play) { this->actor.velocity.y = 0.0f; func_80A4EDF0(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { this->alpha = newAlpha; diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 8e2c5260bb..54b58686e8 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -76,7 +76,7 @@ void EnMm_Init(Actor* thisx, PlayState* play) { if ((this->actor.params >= 0) && ((!(gSaveContext.save.weekEventReg[37] & 0x10)) || (gSaveContext.save.weekEventReg[37] & 8) || (gSaveContext.unk_1014 != 0))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } Actor_ProcessInitChain(&this->actor, sInitChain); diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c index ed67013d8a..e13d260510 100644 --- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c +++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c @@ -404,7 +404,7 @@ void EnMttag_RaceFinish(EnMttag* this, PlayState* play) { EnMttag_ExitRace(play, TRANS_TYPE_02, TRANS_TYPE_02); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -443,7 +443,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) { } else { EnMttag_ExitRace(play, TRANS_TYPE_02, TRANS_TYPE_02); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -460,16 +460,17 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) { EnMttag_ExitRace(play, TRANS_TYPE_02, TRANS_TYPE_02); gSaveContext.eventInf[1] &= (u8)~8; gSaveContext.eventInf[1] |= 4; - Actor_MarkForDeath(&this->actor); - } else { - // Keep racing - func_8019F208(); - func_801477B4(play); - func_800B7298(play, &this->actor, 6); - gSaveContext.eventInf[1] &= (u8)~8; - this->timer = 100; - this->actionFunc = EnMttag_Race; + Actor_Kill(&this->actor); + return; } + + // Keep racing + func_8019F208(); + func_801477B4(play); + func_800B7298(play, &this->actor, 6); + gSaveContext.eventInf[1] &= (u8)~8; + this->timer = 100; + this->actionFunc = EnMttag_Race; } } @@ -496,7 +497,7 @@ void EnMttag_Init(Actor* thisx, PlayState* play) { this->actionFunc = EnMttag_RaceStart; } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c index 4e6c471af9..02fe166e25 100644 --- a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c +++ b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c @@ -816,8 +816,11 @@ void func_80A6A36C(EnMushi2* this, PlayState* play) { } if (sp20 && (this->unk_36A <= 0)) { - Actor_MarkForDeath(&this->actor); - } else if (this->actor.bgCheckFlags & 0x20) { + Actor_Kill(&this->actor); + return; + } + + if (this->actor.bgCheckFlags & 0x20) { func_80A6AAA4(this); } else if (this->actor.bgCheckFlags & 1) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GERUDOFT_WALK); @@ -1038,7 +1041,7 @@ void func_80A6AE7C(EnMushi2* this, PlayState* play) { } if (this->unk_368 <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1105,7 +1108,7 @@ void func_80A6B0D8(EnMushi2* this, PlayState* play) { func_80A6A094(this); func_80A6A0D8(this); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1123,7 +1126,7 @@ void EnMushi2_Update(Actor* thisx, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { func_80A6A094(this); func_80A6A0D8(this); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Muto/z_en_muto.c b/src/overlays/actors/ovl_En_Muto/z_en_muto.c index 8a657ad2ae..631913a2fd 100644 --- a/src/overlays/actors/ovl_En_Muto/z_en_muto.c +++ b/src/overlays/actors/ovl_En_Muto/z_en_muto.c @@ -75,7 +75,7 @@ void EnMuto_Init(Actor* thisx, PlayState* play) { } if (gSaveContext.save.day != 3 || !gSaveContext.save.isNight) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { this->collider.dim.radius = 30; @@ -83,7 +83,7 @@ void EnMuto_Init(Actor* thisx, PlayState* play) { this->collider.dim.yShift = 0; if (gSaveContext.save.weekEventReg[63] & 0x80 || (gSaveContext.save.day == 3 && gSaveContext.save.isNight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -255,7 +255,7 @@ void EnMuto_Update(Actor* thisx, PlayState* play2) { } if (this->isInMayorsRoom && gSaveContext.save.day == 3 && gSaveContext.save.isNight) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c b/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c index bf91c75161..c9d71ca549 100644 --- a/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c +++ b/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c @@ -466,7 +466,7 @@ void EnNeoReeba_PlayDeathEffects(EnNeoReeba* this, PlayState* play) { if (this->actor.scale.x < 0.01f) { func_800B3030(play, &this->actor.world.pos, &sDeadDbAccel, &sDeadDbVel, 120, 0, 0); Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x60); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { if (this->actionTimer <= 10) { diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index c93e531bea..a890cb0e53 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -125,11 +125,11 @@ void EnNutsball_Update(Actor* thisx, PlayState* play2) { } else { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { if (this->timer == -300) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index 3f66f7f70a..de2469c5a1 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -64,7 +64,7 @@ void EnNwc_Init(Actor* thisx, PlayState* play) { niwObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_NIW); if (niwObjectIndex < 0) { // niw object does not exist, we need it for tranformation, despawn - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -72,7 +72,7 @@ void EnNwc_Init(Actor* thisx, PlayState* play) { // if breman mask was already used, replace with adult EnNiw Actor_Spawn(&play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.world.rot.y, 0, NIW_TYPE_REGULAR); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c index ae3b3f04ca..d21ac4a1a2 100644 --- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c +++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c @@ -42,7 +42,7 @@ void EnOkarinaEffect_Init(Actor* thisx, PlayState* play) { EnOkarinaEffect* this = THIS; if (play->envCtx.unk_F2[1]) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } EnOkarinaEffect_SetupAction(this, func_8096B104); } @@ -73,7 +73,7 @@ void func_8096B1FC(EnOkarinaEffect* this, PlayState* play) { } } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Osn/z_en_osn.c b/src/overlays/actors/ovl_En_Osn/z_en_osn.c index 1f9cb3da82..7a17448da4 100644 --- a/src/overlays/actors/ovl_En_Osn/z_en_osn.c +++ b/src/overlays/actors/ovl_En_Osn/z_en_osn.c @@ -205,7 +205,7 @@ void func_80AD0AB0(EnOsn* this) { this->unk_1FA -= 8; if (this->unk_1FA < 8) { this->unk_1FA = 0; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -830,7 +830,8 @@ void EnOsn_Init(Actor* thisx, PlayState* play) { break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); + break; } } diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 618a30986c..167c01a310 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -212,19 +212,19 @@ void EnOssan_CheckValidSpawn(EnOssan* this) { case 2: if (gSaveContext.save.time <= CLOCK_TIME(21, 30) && gSaveContext.save.time > CLOCK_TIME(6, 00)) { if (this->actor.params != ENOSSAN_CURIOSITY_SHOP_MAN) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (this->actor.params == ENOSSAN_CURIOSITY_SHOP_MAN) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; case 3: if (this->actor.params == ENOSSAN_CURIOSITY_SHOP_MAN) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (!(gSaveContext.save.time <= CLOCK_TIME(22, 00) && gSaveContext.save.time >= CLOCK_TIME(6, 00))) { if (this->actor.params != ENOSSAN_CURIOSITY_SHOP_MAN) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } break; @@ -266,14 +266,14 @@ void EnOssan_Init(Actor* thisx, PlayState* play) { s16 id; //! @bug Condition is impossible, params cannot be both greater then 1 AND less then 0. - if (this->actor.params > ENOSSAN_PART_TIME_WORKER && this->actor.params < ENOSSAN_CURIOSITY_SHOP_MAN) { - Actor_MarkForDeath(&this->actor); + if ((this->actor.params > ENOSSAN_PART_TIME_WORKER) && (this->actor.params < ENOSSAN_CURIOSITY_SHOP_MAN)) { + Actor_Kill(&this->actor); return; } id = sObjectIds[this->actor.params]; this->objIndex = Object_GetIndex(&play->objectCtx, id); if (this->objIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } EnOssan_CheckValidSpawn(this); diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.c b/src/overlays/actors/ovl_En_Ot/z_en_ot.c index bf93b729fb..e86d0c62f9 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.c +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.c @@ -201,7 +201,7 @@ void EnOt_Init(Actor* thisx, PlayState* play) { func_80B5C684(this, play); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if ((D_80B5E888 != NULL) && (D_80B5E888->unk_32C & 1)) { this->unk_360 = D_80B5E888; @@ -219,7 +219,7 @@ void EnOt_Init(Actor* thisx, PlayState* play) { break; case 1: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; } break; @@ -274,7 +274,7 @@ void EnOt_Init(Actor* thisx, PlayState* play) { this->actor.update = func_80B5DAEC; func_80B5C634(this, play); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; } @@ -483,7 +483,7 @@ void func_80B5C634(EnOt* this, PlayState* play) { void func_80B5C64C(EnOt* this, PlayState* play) { if (gSaveContext.save.weekEventReg[26] & 8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 8b636787d1..f4baec9e6a 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -151,21 +151,21 @@ void EnOwl_Init(Actor* thisx, PlayState* play) { switch (owlType) { case ENOWL_GET_TYPE_1: if ((switchFlag < 0x7F) && Flags_GetSwitch(play, switchFlag)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENOWL_GET_TYPE_2: if (gSaveContext.save.inventory.items[ITEM_LENS] == ITEM_LENS) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENOWL_GET_TYPE_3: if (CHECK_QUEST_ITEM(QUEST_SONG_SOARING)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -429,7 +429,7 @@ void func_8095B1E4(EnOwl* this, PlayState* play) { } if (this->actor.xzDistToPlayer > 6000.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -740,7 +740,7 @@ void func_8095BF58(EnOwl* this, PlayState* play) { void func_8095BF78(EnOwl* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_20; if (this->actor.xzDistToPlayer > 6000.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_3EC, 2, 0x80, 0x40); @@ -1067,12 +1067,12 @@ void func_8095CCF4(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); if (player->stateFlags3 & 0x10000000) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->actor.world.pos.y < (this->unk_3F0 - 1000.0f)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -1083,7 +1083,7 @@ void func_8095CCF4(Actor* thisx, PlayState* play) { if (this->unk_3DC > 0) { this->unk_3DC--; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } diff --git a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c index 075ced5401..1a60e9d083 100644 --- a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c +++ b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c @@ -156,7 +156,7 @@ void EnPamera_Init(Actor* thisx, PlayState* play) { if (1) {} if (!(gSaveContext.save.weekEventReg[14] & 4) || (gSaveContext.save.weekEventReg[52] & 0x20) || (gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.entrance == ENTRANCE(IKANA_CANYON, 9))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (gSaveContext.save.weekEventReg[61] & 4) { if (!(gSaveContext.save.weekEventReg[59] & 1) || @@ -199,7 +199,7 @@ void func_80BD8588(EnPamera* this, PlayState* play) { Vec3f sp28; if (path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (gSaveContext.save.weekEventReg[61] & 4) { path = &play->setupPathList[path->unk1]; diff --git a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c index 0582b7ca83..805baed5a8 100644 --- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c +++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c @@ -192,7 +192,7 @@ void EnPametfrog_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colElement); this->params = CLAMP(this->actor.params, 1, 4); if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (!(gSaveContext.save.weekEventReg[isFrogReturnedFlags[this->actor.params - 1] >> 8] & (u8)isFrogReturnedFlags[this->actor.params - 1])) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_MINIFROG, this->actor.world.pos.x, this->actor.world.pos.y, @@ -205,11 +205,12 @@ void EnPametfrog_Init(Actor* thisx, PlayState* play) { if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BIGPAMET, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0) == NULL) { - Actor_MarkForDeath(&this->actor); - } else { - this->actor.params = GEKKO_PRE_SNAPPER; - EnPametfrog_SetupLookAround(this); + Actor_Kill(&this->actor); + return; } + + this->actor.params = GEKKO_PRE_SNAPPER; + EnPametfrog_SetupLookAround(this); } } @@ -986,7 +987,7 @@ void EnPametfrog_SpawnFrog(EnPametfrog* this, PlayState* play) { EnPametfrog_ShakeCamera(this, play, 75.0f * magShake, 10.0f * magShake); if (this->timer == 0) { EnPametfrog_StopCutscene(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Paper/z_en_paper.c b/src/overlays/actors/ovl_En_Paper/z_en_paper.c index fd6ac67785..09ec4ea109 100644 --- a/src/overlays/actors/ovl_En_Paper/z_en_paper.c +++ b/src/overlays/actors/ovl_En_Paper/z_en_paper.c @@ -154,10 +154,11 @@ void EnPaper_Update(Actor* thisx, PlayState* play) { func_80C1F87C(this); if (this->timer == 0) { - Actor_MarkForDeath(&this->actor); - } else { - this->timer--; + Actor_Kill(&this->actor); + return; } + + this->timer--; } void EnPaper_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index ef348f4cc5..f995e7c685 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -79,7 +79,7 @@ void func_808654C4(EnPart* this, PlayState* play) { pos.y = this->actor.floorHeight; func_800B3030(play, &pos, &gZeroVec3f, &gZeroVec3f, this->actor.scale.y * 1400.0f, 7, 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 10, NA_SE_EN_EXTINCT); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (this->unk146 <= 0) { switch (this->actor.params) { @@ -101,7 +101,7 @@ void func_808654C4(EnPart* this, PlayState* play) { } break; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk146--; this->zRot += this->unk14C; diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index cf3cd935f5..0e197a8334 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -438,7 +438,7 @@ void func_80897A94(EnPeehat* this, PlayState* play) { if (!(this->actor.bgCheckFlags & 1)) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_PIHAT_SM_DEAD); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if (this->colliderTris.base.atFlags & AT_HIT) { this->colliderTris.base.atFlags &= ~AT_HIT; if (BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.world.rot.y) > 0) { @@ -588,7 +588,7 @@ void func_80898338(EnPeehat* this, PlayState* play) { func_800B3030(play, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 40, 7, 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EN_EXTINCT); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_PIHAT_SM_DEAD); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { func_80897864(this); } @@ -672,7 +672,7 @@ void func_808986A4(EnPeehat* this, PlayState* play) { if (this->unk_2B0 == 0) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xE0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 1f5aebe64b..7c17627a03 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -1481,7 +1481,7 @@ s32 func_80AF98A0(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) { if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_MM3, 116.0f, 26.0f, -219.0f, 0, -0x3F46, 0, 0) != NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); ret = true; } return ret; diff --git a/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c b/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c index a2c5376063..ebd745b1ef 100644 --- a/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c +++ b/src/overlays/actors/ovl_En_Po_Fusen/z_en_po_fusen.c @@ -111,7 +111,7 @@ void EnPoFusen_Init(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 0x4); if (!EnPoFusen_CheckParent(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } heightTemp = this->actor.floorHeight + 90.0f; @@ -238,7 +238,7 @@ void EnPoFusen_Pop(EnPoFusen* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, this->actor.world.pos.y + 20.0f, this->actor.world.pos.z, 255, 255, 200, CLEAR_TAG_POP); Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_BOMB_EXPLOSION); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnPoFusen_InitFuse(EnPoFusen* this) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 57e32a5541..307e160f92 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -714,10 +714,11 @@ void EnPoSisters_DeathStage2(EnPoSisters* this, PlayState* play) { this->deathTimer++; if (this->deathTimer == 32) { - Actor_MarkForDeath(&this->actor); - } else { - EnPoSisters_UpdateDeathFlameSwirl(this, this->deathTimer, &this->actor.world.pos); + Actor_Kill(&this->actor); + return; } + + EnPoSisters_UpdateDeathFlameSwirl(this, this->deathTimer, &this->actor.world.pos); } void EnPoSisters_SpawnMegClones(EnPoSisters* this, PlayState* play) { @@ -734,15 +735,15 @@ void EnPoSisters_SpawnMegClones(EnPoSisters* this, PlayState* play) { // if we cannot spawn all clones: abort if ((clone1 == NULL) || (clone2 == NULL) || (clone3 == NULL)) { if (clone1 != NULL) { - Actor_MarkForDeath(clone1); + Actor_Kill(clone1); } if (clone2 != NULL) { - Actor_MarkForDeath(clone2); + Actor_Kill(clone2); } if (clone3 != NULL) { - Actor_MarkForDeath(clone3); + Actor_Kill(clone3); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -793,7 +794,7 @@ void EnPoSisters_MegCloneWaitForSpinBack(EnPoSisters* this, PlayState* play) { EnPoSisters_SetupSpinBackToVisible(this, play); } else if (parent->actionFunc == EnPoSisters_DeathStage1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index a3718497c8..0d6c1542d6 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -653,7 +653,7 @@ void func_80B2E1D8(EnPoh* this) { void func_80B2E230(EnPoh* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -687,7 +687,7 @@ void func_80B2E3B0(EnPoh* this) { void func_80B2E3F8(EnPoh* this, PlayState* play) { func_80B2DDF8(this, -13); if (this->unk_197 == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Pp/z_en_pp.c b/src/overlays/actors/ovl_En_Pp/z_en_pp.c index 5d04b7567a..2a9d321b43 100644 --- a/src/overlays/actors/ovl_En_Pp/z_en_pp.c +++ b/src/overlays/actors/ovl_En_Pp/z_en_pp.c @@ -1072,7 +1072,7 @@ void EnPp_Dead(EnPp* this, PlayState* play) { Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0xE0); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -1150,7 +1150,7 @@ void EnPp_Mask_Detach(EnPp* this, PlayState* play) { &sMaskFireVelocityAndAccel[i], 70, 0, 2); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } break; @@ -1225,7 +1225,7 @@ void EnPp_BodyPart_Move(EnPp* this, PlayState* play) { } if ((this->timer == 0) || (this->actor.bgCheckFlags & 1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Pr/z_en_pr.c b/src/overlays/actors/ovl_En_Pr/z_en_pr.c index ec8ab91de1..a40c160730 100644 --- a/src/overlays/actors/ovl_En_Pr/z_en_pr.c +++ b/src/overlays/actors/ovl_En_Pr/z_en_pr.c @@ -445,7 +445,7 @@ void func_80A32F48(EnPr* this, PlayState* play) { if (this->unk_2D2 != 0) { Math_SmoothStepToS(&this->unk_2D0, 0, 1, 15, 50); if (this->unk_2D0 < 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c b/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c index 4564c679f0..ed04ae0f6d 100644 --- a/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c +++ b/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c @@ -160,7 +160,7 @@ void EnPr2_Init(Actor* thisx, PlayState* play) { } func_80A745C4(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else { @@ -174,7 +174,7 @@ void EnPr2_Init(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 20.0f, 20.0f, 0x1D); if (!(this->actor.bgCheckFlags & 0x60)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -277,7 +277,7 @@ void func_80A745FC(EnPr2* this, PlayState* play) { } if ((this->path != NULL) && !SubS_CopyPointFromPath(this->path, this->unk_1D0, &this->unk_21C)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Math_ApproachF(&this->actor.world.pos.y, this->unk_21C.y, 0.3f, 5.0f); @@ -337,7 +337,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) { this->actor.speedXZ = 0.0f; Math_SmoothStepToS(&this->unk_1F4, 0, 1, 30, 100); if (this->unk_1F4 < 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { switch (this->unk_1E0) { @@ -455,7 +455,7 @@ void func_80A74E90(EnPr2* this, PlayState* play) { this->actor.speedXZ = 0.0f; Math_SmoothStepToS(&this->unk_1F4, 0, 1, 30, 100); if (this->unk_1F4 < 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { SkelAnime_Update(&this->skelAnime); @@ -558,7 +558,7 @@ void func_80A75310(EnPr2* this, PlayState* play) { this->actor.world.rot.z, i + 10); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else { @@ -601,7 +601,7 @@ void func_80A75310(EnPr2* this, PlayState* play) { EffectSsBubble_Spawn(play, &sp64, 0.0f, 5.0f, 5.0f, frame); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Prz/z_en_prz.c b/src/overlays/actors/ovl_En_Prz/z_en_prz.c index e5c6115783..fd1dee9861 100644 --- a/src/overlays/actors/ovl_En_Prz/z_en_prz.c +++ b/src/overlays/actors/ovl_En_Prz/z_en_prz.c @@ -415,7 +415,7 @@ void func_80A76B14(EnPrz* this, PlayState* play) { EffectSsBubble_Spawn(play, &sp6C, 0.0f, 5.0f, 5.0f, Rand_ZeroFloat(0.03f) + 0.07f); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c index 3190e3e36b..e75096c8fc 100644 --- a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c +++ b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c @@ -318,7 +318,7 @@ void EnRacedog_Init(Actor* thisx, PlayState* play) { if (ENRACEDOG_GET_INDEX(&this->actor) < 14) { this->index = ENRACEDOG_GET_INDEX(&this->actor); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->selectionArrowGreenPrimColor = 255; diff --git a/src/overlays/actors/ovl_En_Raf/z_en_raf.c b/src/overlays/actors/ovl_En_Raf/z_en_raf.c index a3d91bba91..5d7a59e908 100644 --- a/src/overlays/actors/ovl_En_Raf/z_en_raf.c +++ b/src/overlays/actors/ovl_En_Raf/z_en_raf.c @@ -343,7 +343,7 @@ void EnRaf_Idle(EnRaf* this, PlayState* play) { zDiff = explosive->world.pos.z - this->dyna.actor.world.pos.z; if ((fabsf(xDiff) < 80.0f) && (fabsf(yDiff) < 30.0f) && (fabsf(zDiff) < 80.0f) && (explosive->update != NULL) && (explosive->velocity.y != 0.0f)) { - Actor_MarkForDeath(explosive); + Actor_Kill(explosive); this->grabTarget = EN_RAF_GRAB_TARGET_EXPLOSIVE; this->collider.dim.radius = 30; this->collider.dim.height = 90; diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c index bfb7014844..6cf596ba92 100644 --- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c +++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c @@ -248,7 +248,7 @@ void func_80B70D24(EnRailSkb* this, PlayState* play) { while (actor != NULL) { if ((actor->id == ACTOR_OBJ_HAKAISI) && func_80B70B04(this, actor->world.pos)) { if (Flags_GetSwitch(play, (actor->params & 0xFF00) >> 8)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->unk_22C = (ObjHakaisi*)actor; @@ -256,7 +256,7 @@ void func_80B70D24(EnRailSkb* this, PlayState* play) { } actor = actor->next; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } static InitChainEntry sInitChain[] = { @@ -277,7 +277,7 @@ void EnRailSkb_Init(Actor* thisx, PlayState* play) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if (Flags_GetSwitch(play, ENRAILSKB_GET_FF(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Actor_ProcessInitChain(&this->actor, sInitChain); @@ -635,7 +635,7 @@ void func_80B71BB8(EnRailSkb* this, PlayState* play) { } if (this->actor.bgCheckFlags & 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c index 50df4d01cd..443d92d598 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c @@ -273,7 +273,7 @@ void EnRailgibud_Init(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if (gSaveContext.save.weekEventReg[14] & 4) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } EnRailgibud_SetupWalkInCircles(this); @@ -630,7 +630,7 @@ void EnRailgibud_Dead(EnRailgibud* this, PlayState* play) { if (this->deathTimer > 300) { if (this->actor.shape.shadowAlpha == 0) { if (this->actor.parent != NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { // Don't delete the "main" Gibdo, since that will break the surviving // Gibdos' ability to start and stop walking forward. Instead, just @@ -1115,7 +1115,7 @@ void EnRailgibud_InitCutsceneGibdo(EnRailgibud* this, PlayState* play) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if (gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 9)) { // NOT Cutscene: Music Box House Opens - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } EnRailgibud_SetupDoNothing(this); @@ -1166,7 +1166,7 @@ void EnRailgibud_SinkIntoGround(EnRailgibud* this, PlayState* play) { if (this->sinkTimer != 0) { this->sinkTimer--; } else if (Math_SmoothStepToF(&this->actor.shape.yOffset, -9500.0f, 0.5f, 200.0f, 10.0f) < 10.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { EnRailgibud_SpawnEffectsForSinkingIntoTheGround(this, play, 0); } diff --git a/src/overlays/actors/ovl_En_Rat/z_en_rat.c b/src/overlays/actors/ovl_En_Rat/z_en_rat.c index 9057fdb4c2..6759af1832 100644 --- a/src/overlays/actors/ovl_En_Rat/z_en_rat.c +++ b/src/overlays/actors/ovl_En_Rat/z_en_rat.c @@ -762,7 +762,7 @@ void EnRat_PostDetonation(EnRat* this, PlayState* play) { if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_OVERWORLD) { EnRat_SetupRevive(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 0092189c5c..2fdfc650d5 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -1068,7 +1068,7 @@ void EnRd_Dead(EnRd* this, PlayState* play) { this->actor.scale.y -= (75.0f / 1000000.0f); this->alpha -= 5; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { this->deathTimer--; diff --git a/src/overlays/actors/ovl_En_Rg/z_en_rg.c b/src/overlays/actors/ovl_En_Rg/z_en_rg.c index 2d976bdd5c..a2f2f044cb 100644 --- a/src/overlays/actors/ovl_En_Rg/z_en_rg.c +++ b/src/overlays/actors/ovl_En_Rg/z_en_rg.c @@ -758,7 +758,7 @@ void EnRg_Init(Actor* thisx, PlayState* play) { this->unk_31E = 0; this->actionFunc = func_80BF4EBC; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index b164e6aaba..d7dba74e9e 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -36,7 +36,7 @@ void EnRiverSound_Init(Actor* thisx, PlayState* play) { pathIndex = RS_GET_PATH_INDEX(&this->actor); this->actor.params = RS_GET_TYPE(&this->actor); if (pathIndex == 0xFF) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index daf11baa66..9d9f149737 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -714,8 +714,11 @@ void func_808FB42C(EnRr* this, PlayState* play) { Item_DropCollectible(play, &this->actor.world.pos, ITEM00_SHIELD_HERO); } Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x90); - Actor_MarkForDeath(&this->actor); - } else if (this->unk_1E4 == 88) { + Actor_Kill(&this->actor); + return; + } + + if (this->unk_1E4 == 88) { Vec3f sp74; sp74.x = this->actor.world.pos.x; diff --git a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c index 98f7b0a117..63d5aed38f 100644 --- a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c +++ b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c @@ -257,7 +257,7 @@ void EnRuppecrow_UpdateRupees(EnRuppecrow* this) { for (rupeeIndex = 0; rupeeIndex < ENRUPPECROW_RUPEE_COUNT; rupeeIndex++) { rupee = this->rupees[rupeeIndex]; if (rupee != NULL && rupee->unk152 == 0) { - Actor_MarkForDeath(&rupee->actor); + Actor_Kill(&rupee->actor); } } } @@ -577,7 +577,7 @@ void EnRuppecrow_FlyToDespawn(EnRuppecrow* this, PlayState* play) { Math_ApproachF(&this->actor.velocity.y, 3.0f, 0.2f, 0.5f); if (this->actor.world.pos.y > 1000.0f || this->actor.xzDistToPlayer > 2000.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->yOffset += 0x800; this->actor.shape.yOffset = Math_SinS(this->yOffset) * 500.0f; @@ -614,7 +614,7 @@ void EnRuppecrow_FallToDespawn(EnRuppecrow* this, PlayState* play) { 0x0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 0xB, NA_SE_EN_EXTINCT); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -643,7 +643,7 @@ void EnRuppecrow_Init(Actor* thisx, PlayState* play2) { if (this->path != NULL) { this->actionFunc = EnRuppecrow_HandleSong; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c index fbfe32252b..44848ac1d7 100644 --- a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c +++ b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c @@ -1096,7 +1096,7 @@ void EnSGoro_SetupAction(EnSGoro* this, PlayState* play) { this->actor.shape.yOffset = EN_S_GORO_ROLLEDUP_YOFFSET; break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; } } @@ -1311,7 +1311,7 @@ void EnSGoro_Init(Actor* thisx, PlayState* play) { this->loadedObjIndex = objIndex; if (objIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } this->actor.draw = EnSGoro_Draw; diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index adcb781150..5391d650b0 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -368,22 +368,23 @@ void EnSb_Update(Actor* thisx, PlayState* play) { this->actor.params = 1; } Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x80); - Actor_MarkForDeath(&this->actor); - } else { - Actor_SetFocus(&this->actor, 20.0f); - Actor_MoveWithGravity(&this->actor); - this->actionFunc(this, play); - Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 25.0f, 20.0f, 5); - EnSb_UpdateDamage(this, play); - if (player->stateFlags1 & 0x8000000) { - Collider_UpdateCylinder(&this->actor, &this->collider); - if (this->vulnerableTimer == 0) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - } - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); - } - SkelAnime_Update(&this->skelAnime); + Actor_Kill(&this->actor); + return; } + + Actor_SetFocus(&this->actor, 20.0f); + Actor_MoveWithGravity(&this->actor); + this->actionFunc(this, play); + Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 25.0f, 20.0f, 5); + EnSb_UpdateDamage(this, play); + if (player->stateFlags1 & 0x8000000) { + Collider_UpdateCylinder(&this->actor, &this->collider); + if (this->vulnerableTimer == 0) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); + } + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); + } + SkelAnime_Update(&this->skelAnime); } void EnSb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { diff --git a/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c b/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c index 3eb978314d..7433c501d2 100644 --- a/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c +++ b/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c @@ -129,7 +129,7 @@ void func_80BD6B18(EnScRuppe* this, PlayState* play) { if (this->ruppeDisplayTime > 30) { if (func_80BD697C(this->ruppeIndex)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { f32 scale; diff --git a/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c b/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c index 4bccdb846c..6d95fc917d 100644 --- a/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c +++ b/src/overlays/actors/ovl_En_Scopecoin/z_en_scopecoin.c @@ -35,7 +35,7 @@ void EnScopecoin_Spin(EnScopecoin* this, PlayState* play) { void EnScopecoin_CheckCollectible(EnScopecoin* this, PlayState* play) { if (Flags_GetCollectible(play, OBJMUPICT_GET_RUPEE_FLAG(&this->actor))) { Item_DropCollectible(play, &this->actor.world.pos, ITEM00_RUPEE_RED); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -53,7 +53,7 @@ void EnScopecoin_Init(Actor* thisx, PlayState* play) { if (play->actorCtx.flags & ACTORCTX_FLAG_1) { if ((this->rupeeIndex == 2) || (this->rupeeIndex == 6)) { if (Flags_GetCollectible(play, OBJMUPICT_GET_RUPEE_FLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -62,13 +62,13 @@ void EnScopecoin_Init(Actor* thisx, PlayState* play) { } else { if ((this->rupeeIndex == 2) || (this->rupeeIndex == 6)) { if (Flags_GetCollectible(play, OBJMUPICT_GET_RUPEE_FLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.draw = NULL; this->actionFunc = EnScopecoin_CheckCollectible; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c index a4fcb6cb3e..563f375409 100644 --- a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c +++ b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c @@ -244,7 +244,7 @@ void func_80BCD640(EnScopecrow* this, PlayState* play) { } if (this->unk_1FC >= (this->path->count - 1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->unk_1FC++; } @@ -288,15 +288,15 @@ void EnScopecrow_Init(Actor* thisx, PlayState* play) { this->actor.world.pos = sp3C; this->actor.world.pos.y = BgCheck_EntityRaycastFloor1(&play->colCtx, &sp4C, &sp3C); if (this->actor.world.pos.y == BGCHECK_Y_MIN) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } func_80BCD2BC(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -323,11 +323,11 @@ void EnScopecrow_Init(Actor* thisx, PlayState* play) { return; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void EnScopecrow_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c index fd0ced593b..456983face 100644 --- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c +++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c @@ -240,7 +240,7 @@ void func_80BCB1C8(EnScopenuts* this, PlayState* play) { Actor_SetScale(&this->actor, this->unk_350); if (this->actor.bgCheckFlags & 1) { gSaveContext.save.weekEventReg[52] |= 0x40; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -626,7 +626,7 @@ void func_80BCBFFC(EnScopenuts* this, PlayState* play) { } void func_80BCC288(EnScopenuts* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } s32 func_80BCC2AC(EnScopenuts* this, Path* path, s32 arg2_) { @@ -686,7 +686,7 @@ void EnScopenuts_Init(Actor* thisx, PlayState* play) { if (!(gSaveContext.save.weekEventReg[74] & 0x40) && (gSaveContext.save.inventory.items[ITEM_OCARINA] == ITEM_NONE)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -706,20 +706,20 @@ void EnScopenuts_Init(Actor* thisx, PlayState* play) { if (ENSCOPENUTS_GET_3E0(&this->actor) == ENSCOPENUTS_3E0_0) { if (gSaveContext.save.weekEventReg[52] & 0x40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if (play->actorCtx.flags & ACTORCTX_FLAG_1) { this->path = SubS_GetPathByIndex(play, ENSCOPENUTS_GET_FC00(&this->actor), 0x3F); this->actor.draw = NULL; this->actionFunc = func_80BCAFA8; this->actor.gravity = 0.0f; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (ENSCOPENUTS_GET_3E0(&this->actor) == ENSCOPENUTS_3E0_1) { if (gSaveContext.save.weekEventReg[52] & 0x40) { this->path = SubS_GetPathByIndex(play, ENSCOPENUTS_GET_FC00(&this->actor), 0x3F); if (this->path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->actor.gravity = -1.0f; this->actor.draw = EnScopenuts_Draw; @@ -732,10 +732,10 @@ void EnScopenuts_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80BCB230; } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c b/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c index 8e0ad276c0..89d27e4ec8 100644 --- a/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c +++ b/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c @@ -54,23 +54,24 @@ void EnSekihi_Init(Actor* thisx, PlayState* play) { s32 objectIndex; s32 pad; - if ((params < SEKIHI_TYPE_0 || params >= SEKIHI_TYPE_MAX) || sOpaDLists[params] == NULL) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - if ((params == SEKIHI_TYPE_4) && (((gSaveContext.save.skullTokenCount & 0xFFFF)) >= 30)) { - gSaveContext.save.weekEventReg[13] |= 0x20; - } - objectIndex = Object_GetIndex(&play->objectCtx, sObjectIds[params]); - if (objectIndex >= 0) { - this->objectIndex = objectIndex; - } - this->actionFunc = func_80A44DE8; - this->opaDList = sOpaDLists[params]; - this->xluDList = sXluDLists[params]; - this->dyna.actor.textId = sTextIds[params]; - this->dyna.actor.focus.pos.y = this->dyna.actor.world.pos.y + 60.0f; - Actor_SetScale(&this->dyna.actor, 0.1f); + if (((params < SEKIHI_TYPE_0) || (params >= SEKIHI_TYPE_MAX)) || sOpaDLists[params] == NULL) { + Actor_Kill(&this->dyna.actor); + return; } + + if ((params == SEKIHI_TYPE_4) && ((gSaveContext.save.skullTokenCount & 0xFFFF) >= 30)) { + gSaveContext.save.weekEventReg[13] |= 0x20; + } + objectIndex = Object_GetIndex(&play->objectCtx, sObjectIds[params]); + if (objectIndex >= 0) { + this->objectIndex = objectIndex; + } + this->actionFunc = func_80A44DE8; + this->opaDList = sOpaDLists[params]; + this->xluDList = sXluDLists[params]; + this->dyna.actor.textId = sTextIds[params]; + this->dyna.actor.focus.pos.y = this->dyna.actor.world.pos.y + 60.0f; + Actor_SetScale(&this->dyna.actor, 0.1f); } void EnSekihi_Destroy(Actor* thisx, PlayState* play) { @@ -104,7 +105,7 @@ void func_80A44DE8(EnSekihi* this, PlayState* play) { this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); if ((params == SEKIHI_TYPE_4) && (INV_CONTENT(ITEM_MASK_ZORA) != ITEM_MASK_ZORA)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } } diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c index d4a726887a..4d3c4d6372 100644 --- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c +++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c @@ -690,7 +690,7 @@ void func_80ADC37C(EnSellnuts* this, PlayState* play) { } void func_80ADC580(EnSellnuts* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_80ADC5A4(EnSellnuts* this, PlayState* play) { @@ -836,7 +836,7 @@ void func_80ADCA64(EnSellnuts* this, PlayState* play) { } else if (this->unk_34C == 17) { ActorCutscene_Stop(this->cutscene); gSaveContext.save.weekEventReg[73] |= 4; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -948,7 +948,7 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { s32 pad2; if ((gSaveContext.save.weekEventReg[17] & 0x80) || (gSaveContext.save.weekEventReg[61] & 0x10)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Actor_ProcessInitChain(&this->actor, sInitChain); @@ -971,7 +971,7 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { this->actor.velocity.y = 0.0f; if (gSaveContext.save.weekEventReg[73] & 4) { if (ENSELLNUTS_GET_1(&this->actor)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->unk_338 |= 2; diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index d0c02e4fa9..de6175674f 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -555,7 +555,7 @@ void func_8099599C(EnSkb* this, PlayState* play) { Math_ApproachF(&this->actor.shape.shadowScale, 0.0f, 1.0f, 2.5f); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -800,7 +800,7 @@ void func_80996474(EnSkb* this) { void func_809964A0(EnSkb* this, PlayState* play) { if (this->unk_3D0++ >= 19) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c index e2dd8b54b7..30352048b0 100644 --- a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c +++ b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c @@ -34,8 +34,8 @@ void EnSnowman_SetupDead(EnSnowman* this); void EnSnowman_Dead(EnSnowman* this, PlayState* play); void EnSnowman_SetupSplitDoNothing(EnSnowman* this); void EnSnowman_SplitDoNothing(EnSnowman* this, PlayState* play); -void EnSnowman_SetupMarkForDeath(EnSnowman* this); -void EnSnowman_MarkForDeath(EnSnowman* this, PlayState* play); +void EnSnowman_SetupKill(EnSnowman* this); +void EnSnowman_Kill(EnSnowman* this, PlayState* play); void EnSnowman_CreateSplitEeno(EnSnowman* this, Vec3f* basePos, s32 yRot); void EnSnowman_SetupCombine(EnSnowman* this, PlayState* play, Vec3f* combinePos); void EnSnowman_Combine(EnSnowman* this, PlayState* play); @@ -211,14 +211,14 @@ void EnSnowman_Init(Actor* thisx, PlayState* play) { EN_SNOWMAN_TYPE_SPLIT, -1, thisx->unk20, NULL); if ((thisx->child == NULL) || (thisx->parent == NULL)) { if (thisx->child != NULL) { - Actor_MarkForDeath(thisx->child); + Actor_Kill(thisx->child); } if (thisx->parent != NULL) { - Actor_MarkForDeath(thisx->parent); + Actor_Kill(thisx->parent); } - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } @@ -634,11 +634,11 @@ void EnSnowman_Melt(EnSnowman* this, PlayState* play) { if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_SPLIT) { EnSnowman_SetupSplitDoNothing(this); } else if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_LARGE) { - Actor_MarkForDeath(this->actor.parent); - Actor_MarkForDeath(this->actor.child); - Actor_MarkForDeath(&this->actor); + Actor_Kill(this->actor.parent); + Actor_Kill(this->actor.child); + Actor_Kill(&this->actor); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -765,7 +765,7 @@ void EnSnowman_Dead(EnSnowman* this, PlayState* play) { if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_SPLIT) { EnSnowman_SetupSplitDoNothing(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -788,9 +788,9 @@ void EnSnowman_SetupSplitDoNothing(EnSnowman* this) { this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_10); if ((this->actor.parent != NULL) && (((EnSnowman*)this->actor.parent)->actionFunc == EnSnowman_SplitDoNothing)) { if ((this->actor.child != NULL) && (((EnSnowman*)this->actor.child)->actionFunc == EnSnowman_SplitDoNothing)) { - EnSnowman_SetupMarkForDeath((EnSnowman*)this->actor.parent); - EnSnowman_SetupMarkForDeath((EnSnowman*)this->actor.child); - Actor_MarkForDeath(&this->actor); + EnSnowman_SetupKill((EnSnowman*)this->actor.parent); + EnSnowman_SetupKill((EnSnowman*)this->actor.child); + Actor_Kill(&this->actor); } } @@ -801,19 +801,19 @@ void EnSnowman_SplitDoNothing(EnSnowman* this, PlayState* play) { } /** - * Turns off collision on the Eeno before calling Actor_MarkForDeath on it. + * Turns off collision on the Eeno before calling Actor_Kill on it. */ -void EnSnowman_SetupMarkForDeath(EnSnowman* this) { +void EnSnowman_SetupKill(EnSnowman* this) { this->collider.base.acFlags &= ~(AC_ON | AC_HIT); this->collider.base.ocFlags1 &= ~(OC1_ON | OC1_HIT); - this->actionFunc = EnSnowman_MarkForDeath; + this->actionFunc = EnSnowman_Kill; } /** - * Simply calls Actor_MarkForDeath on the Eeno. + * Simply calls Actor_Kill on the Eeno. */ -void EnSnowman_MarkForDeath(EnSnowman* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); +void EnSnowman_Kill(EnSnowman* this, PlayState* play) { + Actor_Kill(&this->actor); } /** @@ -1025,7 +1025,7 @@ void EnSnowman_Update(Actor* thisx, PlayState* play) { EnSnowman_UpdateDamage(this, play); this->actionFunc(this, play); - if (this->actionFunc != EnSnowman_MarkForDeath) { + if (this->actionFunc != EnSnowman_Kill) { Actor_MoveWithGravity(&this->actor); if ((EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_LARGE) && (this->actionFunc == EnSnowman_ReadySnowball)) { @@ -1095,25 +1095,26 @@ void EnSnowman_UpdateSnowball(Actor* thisx, PlayState* play) { 30); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_SMALL_SNOWBALL_BROKEN); } else { - // EnSnowman_SpawnBigSnowballFragmentEffects only fworks with snowballPos, so we need - // to copy the snowball actor's current position into snowballPos to make this fwork. + // EnSnowman_SpawnBigSnowballFragmentEffects only works with snowballPos, so we need + // to copy the snowball actor's current position into snowballPos to make this work. Math_Vec3f_Copy(&this->snowballPos, &this->actor.world.pos); EnSnowman_SpawnBigSnowballFragmentEffects(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_SNOWBALL_BROKEN); } SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_IT_REFLECTION_WOOD); - Actor_MarkForDeath(&this->actor); - } else { - this->actor.shape.rot.x += 0xF00; - Actor_MoveWithGravity(&this->actor); - Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, this->collider.dim.radius * 0.6f, - this->collider.dim.height - this->collider.dim.yShift, 0x1F); - Collider_UpdateCylinder(&this->actor, &this->collider); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); + Actor_Kill(&this->actor); + return; } + + this->actor.shape.rot.x += 0xF00; + Actor_MoveWithGravity(&this->actor); + Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, this->collider.dim.radius * 0.6f, + this->collider.dim.height - this->collider.dim.yShift, 0x1F); + Collider_UpdateCylinder(&this->actor, &this->collider); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } /** diff --git a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c index ebbdcf5425..b7ea5d1942 100644 --- a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c +++ b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c @@ -396,18 +396,18 @@ void EnSob1_Init(Actor* thisx, PlayState* play) { this->shopType = BOMB_SHOP; break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } objIds = sObjectIds[this->shopType]; this->mainObjIndex = Object_GetIndex(&play->objectCtx, objIds[0]); if (this->mainObjIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (!EnSob1_GetObjIndices(this, play, objIds)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } Actor_ProcessInitChain(&this->actor, sInitChain); diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 408ca1b2f2..3f21fcec68 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -655,7 +655,7 @@ void EnSsh_Init(Actor* thisx, PlayState* play) { this->initialYaw = this->actor.world.rot.y; EnSsh_SetupAction(this, EnSsh_Start); if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index ecc2b85b22..4a496c91e7 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -822,7 +822,7 @@ void func_808A701C(EnSt* this, PlayState* play) { if (count == ARRAY_COUNT(this->unk_31C)) { Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (DECR(this->unk_318) == 0) { this->unk_18C |= 0x40; @@ -839,10 +839,11 @@ void EnSt_Init(Actor* thisx, PlayState* play) { this->unk_2C0 = Object_GetIndex(&play->objectCtx, GAMEPLAY_KEEP); if (((ENST_GET_3F(&this->actor) != ENST_3F_63) && Flags_GetSwitch(play, ENST_GET_3F(&this->actor))) || (this->unk_2C0 < 0)) { - Actor_MarkForDeath(&this->actor); - } else { - this->actionFunc = func_808A6A78; + Actor_Kill(&this->actor); + return; } + + this->actionFunc = func_808A6A78; } void EnSt_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 1d9ddf4e96..7bc9b818a8 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -107,7 +107,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { this->actor.flags |= (ACTOR_FLAG_10 | ACTOR_FLAG_20); this->actionFunc = func_80B67958; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -116,7 +116,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) { this->actionFunc = func_80B67DA0; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.textId = 0; if (!(gSaveContext.save.weekEventReg[34] & 0x40) || !(gSaveContext.save.weekEventReg[34] & 8)) { @@ -126,7 +126,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { case ENSTH_F_3: if ((gSaveContext.save.skullTokenCount & 0xFFFF) >= 30) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc = func_80B678A8; @@ -137,7 +137,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { case ENSTH_F_4: if (gSaveContext.save.weekEventReg[13] & 0x20) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.textId = 0; @@ -149,7 +149,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { case ENSTH_F_5: if (!(gSaveContext.save.weekEventReg[13] & 0x20) || (Inventory_GetSkullTokenCount(play->sceneId) < 30)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc = func_80B67208; diff --git a/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c b/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c index 1bf91af6bb..27613eca9a 100644 --- a/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c +++ b/src/overlays/actors/ovl_En_Sth2/z_en_sth2.c @@ -43,7 +43,7 @@ void EnSth2_Init(Actor* thisx, PlayState* play) { if (play->actorCtx.flags & ACTORCTX_FLAG_1) { this->actor.flags |= (ACTOR_FLAG_10 | ACTOR_FLAG_20); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc = EnSth2_UpdateSkelAnime; diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 4f3882aa7f..9f24c27351 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -904,7 +904,7 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) { func_80BABFD4(this, play); break; case 1: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); break; case 2: if (!(gSaveContext.save.weekEventReg[81] & 4)) { @@ -963,11 +963,11 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { } } else if (play->sceneId == SCENE_BACKTOWN) { if (gSaveContext.save.time >= CLOCK_TIME(0, 20) && gSaveContext.save.time < CLOCK_TIME(6, 00)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if ((gSaveContext.save.entrance == ENTRANCE(NORTH_CLOCK_TOWN, 7)) || (gSaveContext.save.weekEventReg[58] & 0x40)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->cutscenes[0] = this->actor.cutscene; this->cutscenes[1] = ActorCutscene_GetAdditionalCutscene(this->cutscenes[0]); @@ -979,7 +979,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { return; } else if (play->sceneId == SCENE_ICHIBA) { if (gSaveContext.save.weekEventReg[33] & 8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->animIndex = 0; @@ -989,7 +989,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { return; } else if (play->sceneId == SCENE_AYASHIISHOP) { if (gSaveContext.save.weekEventReg[33] & 8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->animIndex = 0; @@ -1005,7 +1005,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { this->actionFunc = func_80BACA14; return; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_80BACA14(EnSuttari* this, PlayState* play) { @@ -1226,7 +1226,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_SMALL_EXPLOSION); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_IT_BOMB_EXPLOSION); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->unk1F4[1] == -0x63) { @@ -1266,7 +1266,7 @@ void func_80BAD5F8(EnSuttari* this, PlayState* play) { this->unk428 = scheduleOutput.result; func_80BAC2FC(this, play); if ((this->unk430 == 1) && (this->timePath->unk1 == 0xFF)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } func_80BAB434(this); @@ -1304,7 +1304,7 @@ void func_80BAD7F8(EnSuttari* this, PlayState* play) { this->unk428 = scheduleOutput.result; func_80BAC2FC(this, play); if ((this->unk430 == 1) && (this->timePath->unk1 == 0xFF)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if ((this->flags1 & 0x20) && (scheduleOutput.result != 9)) { @@ -1434,7 +1434,7 @@ void func_80BADE8C(EnSuttari* this, PlayState* play) { void func_80BADF3C(EnSuttari* this, PlayState* play) { func_80BABB90(this, 0); if (this->unk1F4[0] == -0x63) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->unk3F2 = this->headRot.y; if (DECR(this->unk3F6) == 0) { @@ -1448,7 +1448,7 @@ void EnSuttari_Init(Actor* thisx, PlayState* play) { s32 pad; if (gSaveContext.save.weekEventReg[79] & 0x40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } Collider_InitCylinder(play, &this->collider); diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index fc3aff029b..24326e7e8c 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -1023,7 +1023,7 @@ void func_808DAEB4(EnSw* this, PlayState* play) { } if (count == ARRAY_COUNT(this->unk_464)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { Math_ApproachF(&this->actor.scale.x, 0.0f, 0.08f, 1.0f); @@ -1038,7 +1038,7 @@ void func_808DAEB4(EnSw* this, PlayState* play) { 0, this->actor.params) != NULL) { play_sound(NA_SE_SY_KINSTA_MARK_APPEAR); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } func_808D94D0(this, play, 0, 0, 0x1554); } @@ -1210,7 +1210,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) { break; } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c index 0b76c77151..3233321c28 100644 --- a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c +++ b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c @@ -96,7 +96,7 @@ void EnSyatekiCrow_Init(Actor* thisx, PlayState* play2) { ActorShape_Init(&this->actor.shape, 2000.0f, ActorShadow_DrawCircle, 20.0f); if ((path == NULL) || (EN_SYATEKI_CROW_GET_INDEX(&this->actor) >= 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c index b7e79fdfd1..c1af4524a1 100644 --- a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c +++ b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c @@ -142,7 +142,7 @@ void EnSyatekiDekunuts_Init(Actor* thisx, PlayState* play2) { DEKU_SCRUB_LIMB_MAX); if (path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c b/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c index d9059577cc..4e8731c1cf 100644 --- a/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c +++ b/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c @@ -105,7 +105,7 @@ void EnSyatekiOkuta_Init(Actor* thisx, PlayState* play) { if (!(WaterBox_GetSurface1_2(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z, &ySurface, &waterbox)) || (ySurface <= this->actor.floorHeight)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { this->actor.world.pos.y = this->actor.home.pos.y = ySurface; } diff --git a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c index ad9aa824fb..4456a1f219 100644 --- a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c +++ b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c @@ -156,7 +156,7 @@ void EnSyatekiWf_Init(Actor* thisx, PlayState* play) { } if (path == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c index 393caa1d9f..e1f80e24e9 100644 --- a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c +++ b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c @@ -269,7 +269,7 @@ void EnTalkGibud_Init(Actor* thisx, PlayState* play) { } if (this->switchFlag != -1 && Flags_GetSwitch(play, this->switchFlag)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } EnTalkGibud_SetupIdle(this); @@ -876,7 +876,7 @@ void EnTalkGibud_Disappear(EnTalkGibud* this, PlayState* play) { } player->stateFlags1 &= ~0x20; player->stateFlags1 &= ~0x20000000; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c index 9737c9f813..adb221fbf7 100644 --- a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c +++ b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c @@ -394,7 +394,7 @@ void func_80BB7408(EnTanron2* this, PlayState* play) { if (this->actor.world.pos.y <= this->actor.floorHeight) { this->actor.world.pos.y = this->actor.floorHeight; if ((s8)this->actor.colChkInfo.health <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); func_80BB71C8(this, play); D_80BB8450->unk_6F6--; D_80BB8450->unk_2E2 += 4; @@ -470,7 +470,7 @@ void func_80BB7578(EnTanron2* this, PlayState* play) { Matrix_MultVecZ(10.0f, &this->actor.velocity); this->unk_152 = Rand_ZeroFloat(100.0f) + 200.0f; } else if (D_80BB8450->unk_1F6 == 10) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); func_80BB71C8(this, play); } } @@ -579,7 +579,7 @@ void func_80BB7B90(Actor* thisx, PlayState* play) { D_80BB8454 = (Math_SinS(play->gameplayFrames * 0x3000) * 0.1f) + 1.0f; if (D_80BB8450->unk_1F6 == 11) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c index d683cde8ce..2b7f7ff353 100644 --- a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c +++ b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c @@ -354,7 +354,7 @@ void EnTanron3_Die(EnTanron3* this, PlayState* play) { Actor_MoveWithoutGravityReverse(&this->actor); if (this->workTimer[WORK_TIMER_DIE] == 0) { EnTanron3_SpawnBubbles(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (Rand_ZeroOne() < 0.3f) { Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0x60); } diff --git a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c index f45afbb013..b40cc101fa 100644 --- a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c +++ b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c @@ -150,7 +150,7 @@ void EnTanron5_Init(Actor* thisx, PlayState* play) { if (ENTANRON5_GET(&this->actor) >= ENTANRON5_100) { D_80BE5D80++; if (D_80BE5D80 > 60) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -201,7 +201,7 @@ void EnTanron5_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetCylinder(play, &child->collider, &child->actor, &sCylinderInit); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 150.0f, 100.0f, 4); this->actor.world.pos.y = this->actor.floorHeight + -20.0f; @@ -230,7 +230,7 @@ void EnTanron5_Update(Actor* thisx, PlayState* play2) { this->unk_1A0++; Actor_SetScale(&this->actor, 0.0f); if (this->unk_1A0 >= 40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; } else { @@ -406,13 +406,13 @@ void func_80BE5818(Actor* thisx, PlayState* play2) { this->unk_1A0++; this->actor.world.pos.y -= 2.0f * D_80BE5DD0; if (this->unk_1A0 == 40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; } if (DECR(this->unk_144) == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (this->actor.speedXZ > 0.02f) { @@ -435,7 +435,7 @@ void func_80BE5818(Actor* thisx, PlayState* play2) { } this->unk_1A0++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } else { @@ -464,7 +464,7 @@ void func_80BE5818(Actor* thisx, PlayState* play2) { } else { Item_Give(play, ITEM_MAGIC_LARGE); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); play_sound(NA_SE_SY_GET_ITEM); } else { this->unk_1A1 = 20; diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index 348290ccf1..3d3ac276e3 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -175,7 +175,7 @@ void EnTest_Init(Actor* thisx, PlayState* play2) { thisx->floorHeight = BgCheck_EntityRaycastFloor3(&play->colCtx, &thisx->floorPoly, &sp34, &thisx->world.pos); if ((thisx->floorPoly == NULL) || (thisx->floorHeight == BGCHECK_Y_MIN)) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } @@ -208,7 +208,7 @@ void EnTest_Update(Actor* thisx, PlayState* play) { if (func_80183DE0(&this->skeletonInfo) && (this->actor.parent == NULL) && (this->actor.params != -1)) { this->unk_209++; if (this->unk_209 > 20) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Test2/z_en_test2.c b/src/overlays/actors/ovl_En_Test2/z_en_test2.c index c9151d6216..8303f1493f 100644 --- a/src/overlays/actors/ovl_En_Test2/z_en_test2.c +++ b/src/overlays/actors/ovl_En_Test2/z_en_test2.c @@ -85,7 +85,7 @@ void EnTest2_Update(Actor* thisx, PlayState* play) { objectIndex = Object_GetIndex(&play->objectCtx, sObjectIds[this->actor.params]); if (objectIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (Object_IsLoaded(&play->objectCtx, objectIndex)) { diff --git a/src/overlays/actors/ovl_En_Test4/z_en_test4.c b/src/overlays/actors/ovl_En_Test4/z_en_test4.c index 805a6f8bf8..c9c849b309 100644 --- a/src/overlays/actors/ovl_En_Test4/z_en_test4.c +++ b/src/overlays/actors/ovl_En_Test4/z_en_test4.c @@ -305,7 +305,7 @@ void EnTest4_Init(Actor* thisx, PlayState* play) { } if (sIsLoaded || (gSaveContext.eventInf[2] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { sIsLoaded = true; this->actor.room = -1; @@ -319,7 +319,7 @@ void EnTest4_Init(Actor* thisx, PlayState* play) { SET_NEXT_GAMESTATE(&play->state, DayTelop_Init, sizeof(DayTelopState)); this->unk_144 = 1; gSaveContext.save.time = CLOCK_TIME(6, 0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { gSaveContext.save.day = 1; dayTemp = gSaveContext.save.day; @@ -389,7 +389,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { } else if (temp_a0 == CLOCK_TIME(6, 0)) { if (CURRENT_DAY == 3) { Interface_StartMoonCrash(play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); gSaveContext.eventInf[1] |= 0x80; } else if (((sCutscenes[this->unk_144] < 0) || (play->actorCtx.flags & ACTORCTX_FLAG_1)) && (CURRENT_DAY != 3)) { @@ -413,7 +413,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { gSaveContext.respawnFlag = -4; gSaveContext.eventInf[2] |= 0x80; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -457,7 +457,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_02; player->stateFlags1 |= 0x200; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } func_80A42198(this); } else { diff --git a/src/overlays/actors/ovl_En_Test5/z_en_test5.c b/src/overlays/actors/ovl_En_Test5/z_en_test5.c index 13cb04b028..760474b1b0 100644 --- a/src/overlays/actors/ovl_En_Test5/z_en_test5.c +++ b/src/overlays/actors/ovl_En_Test5/z_en_test5.c @@ -41,7 +41,7 @@ void EnTest5_Init(Actor* thisx, PlayState* play2) { // If not spawned above a water source, immediately despawn if (!WaterBox_GetSurface1(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z, &ySurface, &water)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c index ea50336d91..bc47e3e522 100644 --- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c +++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c @@ -302,7 +302,7 @@ void EnTest6_Init(Actor* thisx, PlayState* play2) { if (((ENTEST6_GET(&this->actor) == ENTEST6_24) || (ENTEST6_GET(&this->actor) == ENTEST6_25) || (ENTEST6_GET(&this->actor) == ENTEST6_26)) && (play->playerActorCsIds[8] == -1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -398,7 +398,7 @@ void func_80A916F0(EnTest6* this, PlayState* play) { func_800B7298(play, NULL, 6); func_80A90C34(); Distortion_ClearType(DISTORTION_TYPE_5); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_80A91760(EnTest6* this, PlayState* play) { @@ -619,7 +619,7 @@ void func_80A92118(EnTest6* this, PlayState* play) { func_800B7298(play, NULL, 6); func_80A90C34(); Distortion_ClearType(DISTORTION_TYPE_5); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_80A92188(EnTest6* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Test7/z_en_test7.c b/src/overlays/actors/ovl_En_Test7/z_en_test7.c index 5f153e5a98..272d4dbdd9 100644 --- a/src/overlays/actors/ovl_En_Test7/z_en_test7.c +++ b/src/overlays/actors/ovl_En_Test7/z_en_test7.c @@ -413,7 +413,7 @@ void EnTest7_Init(Actor* thisx, PlayState* play2) { } if (play->playerActorCsIds[8] == -1) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -921,7 +921,7 @@ void func_80AF30F4(EnTest7* this, PlayState* play) { if (this->unk_1E54 > 90) { player->stateFlags1 &= ~0x20; player->stateFlags1 &= ~0x20000000; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c index fc82ed2620..ae3e6a7aa1 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -166,12 +166,16 @@ void EnThiefbird_Init(Actor* thisx, PlayState* play) { if (this->actor.params == 1) { D_80C1392C = 1; Math_Vec3f_Copy(&D_80C13920, &this->actor.world.pos); - Actor_MarkForDeath(&this->actor); - } else if (STOLEN_ITEM_1 != STOLEN_ITEM_NONE) { - Actor_MarkForDeath(&this->actor); - } else { - func_80C11538(this); + Actor_Kill(&this->actor); + return; } + + if (STOLEN_ITEM_1 != STOLEN_ITEM_NONE) { + Actor_Kill(&this->actor); + return; + } + + func_80C11538(this); } void EnThiefbird_Destroy(Actor* thisx, PlayState* play) { @@ -657,7 +661,7 @@ void func_80C11DF0(EnThiefbird* this, PlayState* play) { } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -830,7 +834,7 @@ void func_80C126D8(EnThiefbird* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ApproachS(&this->actor.shape.rot.x, 0x3000, 6, 0x1000); if (this->actor.playerHeightRel > 100.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c index a8e74ff6ed..cb13954ede 100644 --- a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c +++ b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c @@ -50,7 +50,7 @@ void EnTimeTag_Init(Actor* thisx, PlayState* play) { switch (ENTIMETAG_GET_E000(&this->actor)) { case 4: if ((gSaveContext.save.weekEventReg[8] & 0x40) || (CURRENT_DAY != 3)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.home.rot.x = 0; diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index b912f6f38d..dcf841968e 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -668,12 +668,13 @@ void func_808951B8(EnTite* this, PlayState* play) { func_800B3030(play, &this->limbPos[i], &gZeroVec3f, &gZeroVec3f, 40, 7, 1); SoundSource_PlaySfxAtFixedWorldPos(play, &this->limbPos[i], 11, NA_SE_EN_EXTINCT); } - Actor_MarkForDeath(&this->actor); - } else { - for (i = 0; i < ARRAY_COUNT(this->unk_33C); i++) { - Math_Vec3f_Sum(&this->limbPos[i], &this->unk_33C[i], &this->limbPos[i]); - this->unk_33C[i].y += this->actor.gravity; - } + Actor_Kill(&this->actor); + return; + } + + for (i = 0; i < ARRAY_COUNT(this->unk_33C); i++) { + Math_Vec3f_Sum(&this->limbPos[i], &this->unk_33C[i], &this->limbPos[i]); + this->unk_33C[i].y += this->actor.gravity; } } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 60c4b4dd0f..9197b9dc70 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -209,11 +209,11 @@ void EnTk_Init(Actor* thisx, PlayState* play) { if (Flags_GetSwitch(play, this->unk_2B1)) { if (this->unk_2B0 == 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (this->unk_2B0 == 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -252,7 +252,7 @@ void EnTk_Init(Actor* thisx, PlayState* play) { switch (this->unk_2B0) { case 4: if (D_80AF0050 != 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } D_80AF0050 = 1; @@ -271,7 +271,7 @@ void EnTk_Init(Actor* thisx, PlayState* play) { break; default: - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -679,7 +679,7 @@ void func_80AED940(EnTk* this, PlayState* play) { if (ENTK_GET_F(actor) == 1) { Math_Vec3f_Copy(&this->unk_2EC, &actor->world.pos); Math_Vec3s_Copy(&this->unk_2F8, &actor->world.rot); - Actor_MarkForDeath(actor); + Actor_Kill(actor); this->unk_2CA |= 0x40; break; } @@ -735,7 +735,7 @@ void func_80AEDD4C(EnTk* this, PlayState* play) { if (this->unk_2E8 <= 0) { ActorCutscene_Stop(this->cutscenes[1]); func_801477B4(play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -928,11 +928,12 @@ void func_80AEE374(EnTk* this, PlayState* play) { SubS_FindActorCustom(play, &this->actor, NULL, ACTORCAT_NPC, ACTOR_EN_TK, &sp30, func_80AEE300); if (sp30.unk_00 == 0) { - Actor_MarkForDeath(&this->actor); - } else { - this->unk_2CC = Actor_YawToPoint(&this->actor, &sp30.unk_00->world.pos); - this->actionFunc = func_80AEE414; + Actor_Kill(&this->actor); + return; } + + this->unk_2CC = Actor_YawToPoint(&this->actor, &sp30.unk_00->world.pos); + this->actionFunc = func_80AEE414; } void func_80AEE414(EnTk* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/src/overlays/actors/ovl_En_Torch/z_en_torch.c index 9a09e27eb2..0dd8222ce1 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -29,5 +29,5 @@ void EnTorch_Init(Actor* thisx, PlayState* play) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOX, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, ENBOX_PARAMS(ENBOX_TYPE_SMALL, sChestContents[(returnData >> 0x5) & 0x7], returnData)); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 479ceaad6f..4d02d749ac 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -149,11 +149,12 @@ void EnTorch2_UpdateDeath(Actor* thisx, PlayState* play) { // Fall down and become transparent, then delete once invisible if (Math_StepToS(&this->alpha, 0, 8)) { - Actor_MarkForDeath(&this->actor); - } else { - this->actor.gravity = -1.0f; - Actor_MoveWithGravity(&this->actor); + Actor_Kill(&this->actor); + return; } + + this->actor.gravity = -1.0f; + Actor_MoveWithGravity(&this->actor); } void EnTorch2_Draw(Actor* thisx, PlayState* play2) { diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c index a55c899eff..3c1f35af31 100644 --- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c +++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c @@ -186,7 +186,7 @@ void EnToto_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); if ((play->sceneId == SCENE_MILK_BAR) && (gSaveContext.save.time >= CLOCK_TIME(6, 0)) && (gSaveContext.save.time < CLOCK_TIME(21, 30))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -510,7 +510,7 @@ s32 func_80BA4530(EnToto* this, PlayState* play) { func_80BA3C88(this); if (player->actor.world.pos.z > -270.0f) { if (this->spotlights != NULL) { - Actor_MarkForDeath(this->spotlights); + Actor_Kill(this->spotlights); } this->unk2B6 = 1; return this->text->unk1; @@ -612,11 +612,11 @@ s32 func_80BA4A00(EnToto* this, PlayState* play) { actor = &GET_PLAYER(play)->actor; actor = actor->next; while (actor != NULL) { - Actor_MarkForDeath(actor); + Actor_Kill(actor); actor = actor->next; } if (this->spotlights != NULL) { - Actor_MarkForDeath(this->spotlights); + Actor_Kill(this->spotlights); } func_800B7298(play, NULL, 0x45); if (this->unk2B3 == 0xF) { diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index ac6a4f4763..9e4375ae66 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -243,7 +243,7 @@ void func_80AD381C(EnTrt2* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_10; } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -251,7 +251,7 @@ void func_80AD38B8(EnTrt2* this, PlayState* play) { Vec3s sp30; if (this->unk_3D9 == 2) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (this->path != NULL) { @@ -482,7 +482,7 @@ void func_80AD431C(EnTrt2* this, PlayState* play) { Player* player = GET_PLAYER(play); player->stateFlags1 &= ~0x20; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_80AD434C(EnTrt2* this, PlayState* play) { @@ -743,12 +743,12 @@ void func_80AD4DB4(EnTrt2* this, PlayState* play) { this->unk_3BC = func_80AD4608; if (gSaveContext.save.weekEventReg[12] & 8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (gSaveContext.save.weekEventReg[84] & 0x40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -758,18 +758,18 @@ void func_80AD4DB4(EnTrt2* this, PlayState* play) { gSaveContext.save.weekEventReg[15] |= 0x80; this->unk_3B2 = 3; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (gSaveContext.save.day == 2) { if (gSaveContext.save.weekEventReg[15] & 0x80) { this->unk_3B2 = 4; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } else if (gSaveContext.save.day == 3) { diff --git a/src/overlays/actors/ovl_En_Tru/z_en_tru.c b/src/overlays/actors/ovl_En_Tru/z_en_tru.c index c54d924dfe..3e619cac39 100644 --- a/src/overlays/actors/ovl_En_Tru/z_en_tru.c +++ b/src/overlays/actors/ovl_En_Tru/z_en_tru.c @@ -1128,7 +1128,7 @@ void EnTru_Init(Actor* thisx, PlayState* play) { EnTru* this = THIS; if ((gSaveContext.save.entrance != 0xC200) || (gSaveContext.save.weekEventReg[12] & 8)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c index 69725414ad..3982e04200 100644 --- a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c +++ b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c @@ -414,12 +414,12 @@ void EnTruMt_Init(Actor* thisx, PlayState* play) { EnTruMt* this = THIS; if (!(gSaveContext.eventInf[3] & 0x20)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (func_80B763C4(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c b/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c index 15d4cf3e54..d671f85ffc 100644 --- a/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c +++ b/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c @@ -88,7 +88,7 @@ void func_80ADFCEC(EnTsn* this, PlayState* play) { switch (ENTSN_GET_F(&this->actor)) { case ENTSN_F_0: if (gSaveContext.save.weekEventReg[26] & 8) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.textId = 0x106E; @@ -107,7 +107,7 @@ void func_80ADFCEC(EnTsn* this, PlayState* play) { if ((ENTSN_GET_F(&this->actor)) == ENTSN_F_0) { this->actionFunc = func_80AE0D78; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; } @@ -116,7 +116,7 @@ void func_80ADFCEC(EnTsn* this, PlayState* play) { this->unk_220 = 0; if (this->unk_1D8 == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if ((ENTSN_GET_F(&this->actor)) == ENTSN_F_1) { func_800BC154(play, &play->actorCtx, &this->actor, 6); } @@ -145,7 +145,7 @@ void EnTsn_Init(Actor* thisx, PlayState* play) { this->actor.gravity = -1.0f; if (gSaveContext.save.weekEventReg[55] & 0x80) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -291,7 +291,7 @@ void func_80AE0304(EnTsn* this, PlayState* play) { void func_80AE0418(EnTsn* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { Message_StartTextbox(play, 0x107D, NULL); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index bf1e44e988..c466995a5d 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -177,7 +177,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) { EnTuboTrap_SpawnEffectsInWater(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_BOMB_DROP_WATER); EnTuboTrap_DropCollectible(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -187,7 +187,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_IT_SHIELD_REFLECT_SW); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN); EnTuboTrap_DropCollectible(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -197,7 +197,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN); EnTuboTrap_DropCollectible(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -209,7 +209,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN); SoundSource_PlaySfxAtFixedWorldPos(play, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT); EnTuboTrap_DropCollectible(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -218,7 +218,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) { EnTuboTrap_SpawnEffectsOnLand(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN); EnTuboTrap_DropCollectible(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Twig/z_en_twig.c b/src/overlays/actors/ovl_En_Twig/z_en_twig.c index 1f26288c4d..0331dc24e8 100644 --- a/src/overlays/actors/ovl_En_Twig/z_en_twig.c +++ b/src/overlays/actors/ovl_En_Twig/z_en_twig.c @@ -70,7 +70,7 @@ void EnTwig_Init(Actor* thisx, PlayState* play2) { this->dyna.actor.bgCheckFlags |= 0x400; switch (this->unk_160) { case 0: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); break; case 1: if (!sRingsHaveSpawned) { @@ -82,11 +82,11 @@ void EnTwig_Init(Actor* thisx, PlayState* play2) { } if (RACERING_GET_PARAM_1F0(&this->dyna.actor) != 0) { if (!(gSaveContext.save.weekEventReg[24] & 4)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } } else if (gSaveContext.save.weekEventReg[24] & 4) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } Actor_SetScale(&this->dyna.actor, 4.2f); @@ -213,7 +213,7 @@ void func_80AC0D2C(EnTwig* this, PlayState* play) { sCurrentRing = -1; } } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } this->unk_170 += 180.0f / 0x10000; diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index 2dedc7c2ac..d0062df49d 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -398,7 +398,7 @@ void func_808CCCF0(EnVm* this, PlayState* play) { } } else if (this->unk_214 == 0) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 9dca3642f3..13f3efff8b 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -171,7 +171,7 @@ void EnWallmas_Init(Actor* thisx, PlayState* play) { if (WALLMASTER_GET_TYPE(&this->actor) == WALLMASTER_TYPE_FLAG) { if (Flags_GetSwitch(play, this->switchFlag)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -376,7 +376,7 @@ void EnWallmas_ReturnToCeiling(EnWallmas* this, PlayState* play) { if (this->actor.playerHeightRel < -900.0f) { if (WALLMASTER_GET_TYPE(&this->actor) == WALLMASTER_TYPE_FLAG) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -444,7 +444,7 @@ void EnWallmas_Die(EnWallmas* this, PlayState* play) { if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.0015f)) { Actor_SetScale(&this->actor, 0.01f); Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x90); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.scale.z = this->actor.scale.x; diff --git a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c index 1ba5e6ebcd..2b4feee165 100644 --- a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c +++ b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c @@ -59,7 +59,7 @@ void EnWarptag_Init(Actor* thisx, PlayState* play) { } else { if ((this->dangeonKeepObject = Object_GetIndex(&play->objectCtx, GAMEPLAY_DANGEON_KEEP)) < 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } this->actionFunc = EnWarpTag_CheckDungeonKeepObject; diff --git a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c index aa36b69472..af8df0f2c1 100644 --- a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c +++ b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c @@ -580,7 +580,7 @@ void func_80A5A534(Actor* thisx, PlayState* play) { s32 i; if (this->unk_E38 < 1.0f) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->unk_DC4++; diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index ec6f12aeb5..5f71969b29 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -78,7 +78,7 @@ void EnWeatherTag_Init(Actor* thisx, PlayState* play) { break; case WEATHERTAG_TYPE_UNK1: if (gSaveContext.save.weekEventReg[52] & 0x20) { // if cleared STT - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } EnWeatherTag_SetupAction(this, func_80966B08); break; @@ -214,15 +214,15 @@ void func_80966A68(EnWeatherTag* this, PlayState* play) { } if ((s16)this->unk154 < 0) { // cast req this->unk154 = 0; - // @BUG redudant code - Actor_MarkForDeath(&this->actor); + // redundant code + Actor_Kill(&this->actor); EnWeatherTag_SetupAction(this, EnWeatherTag_Die); } func_8096689C(this, play); } void EnWeatherTag_Die(EnWeatherTag* this, PlayState* play) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } // WEATHERTAG_TYPE_UNK1 diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 811f828a8b..f3bfabf4b5 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -309,7 +309,7 @@ void EnWf_Init(Actor* thisx, PlayState* play) { } if (Flags_GetClear(play, this->actor.room)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -1181,7 +1181,7 @@ void func_80992E0C(EnWf* this, PlayState* play) { } else { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x60); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { s32 i; Vec3f sp60; diff --git a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c index 0abf1fe565..375e298dc9 100644 --- a/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c +++ b/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c @@ -352,7 +352,7 @@ void EnWiz_Init(Actor* thisx, PlayState* play) { } if ((this->switchFlag >= 0) && (Flags_GetSwitch(play, this->switchFlag))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -1183,7 +1183,7 @@ void EnWiz_Dead(EnWiz* this, PlayState* play) { if (this->alpha < 30) { EnWiz_SelectPlatform(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_EXTINCT); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if (this->switchFlag >= 0) { Flags_SetSwitch(play, this->switchFlag); } diff --git a/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c b/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c index ce13687a7c..634e83efbc 100644 --- a/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c +++ b/src/overlays/actors/ovl_En_Wiz_Brock/z_en_wiz_brock.c @@ -80,7 +80,7 @@ void EnWizBrock_UpdateStatus(EnWizBrock* this, PlayState* play) { (BREG(56) / 1000.0f) + 0.002f); this->dyna.actor.scale.z = this->dyna.actor.scale.x; if (this->dyna.actor.scale.y < 0.001f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } } diff --git a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c index ca3fde7451..543865e0bf 100644 --- a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c +++ b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c @@ -330,7 +330,7 @@ void EnWiz_SmallFlame(EnWizFire* this, PlayState* play) { Math_ApproachF(&this->scale, 2.0f * this->targetScale, 0.2f, 0.002f); Math_ApproachZeroF(&this->alpha, 1.0f, 35.0f); if ((this->timer == 0) && (this->alpha < 2.0f)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; } @@ -444,7 +444,7 @@ void EnWiz_Pool(EnWizFire* this, PlayState* play) { if ((this->poolScale < 0.001f) && (this->blendScaleFrac < 0.001f)) { sPoolHitByIceArrow = false; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } return; @@ -463,7 +463,7 @@ void EnWiz_Pool(EnWizFire* this, PlayState* play) { wiz->hasActiveProjectile = false; } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } @@ -483,7 +483,7 @@ void EnWiz_KillMagicProjectile(EnWizFire* this, PlayState* play) { } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index 08295ad1e7..59fc37ad31 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -312,7 +312,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play) { if (floorY > BGCHECK_Y_MIN) { this->actor.world.pos.y = floorY; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } @@ -374,7 +374,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { ((EnWood02*)thisx->parent)->unk_14A[index] = phi_v0; - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } this->unk_151 = 0; @@ -449,7 +449,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { thisx->shape.rot.z = Math_SinS(this->unk_146 * 0xBB8) * 16384.0f; this->unk_14A[0]--; if (this->unk_14A[0] == 0) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); } } diff --git a/src/overlays/actors/ovl_En_Yb/z_en_yb.c b/src/overlays/actors/ovl_En_Yb/z_en_yb.c index 11474f01eb..486790dfdc 100644 --- a/src/overlays/actors/ovl_En_Yb/z_en_yb.c +++ b/src/overlays/actors/ovl_En_Yb/z_en_yb.c @@ -122,7 +122,7 @@ void EnYb_Init(Actor* thisx, PlayState* play) { // check if already healed if (gSaveContext.save.weekEventReg[82] & 4) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -250,7 +250,7 @@ void EnYb_Disappear(EnYb* this, PlayState* play) { if (this->alpha > 10) { this->alpha -= 10; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Zob/z_en_zob.c b/src/overlays/actors/ovl_En_Zob/z_en_zob.c index 1970e53df2..710b82e4db 100644 --- a/src/overlays/actors/ovl_En_Zob/z_en_zob.c +++ b/src/overlays/actors/ovl_En_Zob/z_en_zob.c @@ -121,7 +121,7 @@ void EnZob_Init(Actor* thisx, PlayState* play) { } if (!(gSaveContext.save.weekEventReg[55] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -136,7 +136,7 @@ void EnZob_Init(Actor* thisx, PlayState* play) { default: if (gSaveContext.save.weekEventReg[55] & 0x80) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.flags |= ACTOR_FLAG_10; break; diff --git a/src/overlays/actors/ovl_En_Zog/z_en_zog.c b/src/overlays/actors/ovl_En_Zog/z_en_zog.c index 0ea1d448f5..f572e82574 100644 --- a/src/overlays/actors/ovl_En_Zog/z_en_zog.c +++ b/src/overlays/actors/ovl_En_Zog/z_en_zog.c @@ -207,7 +207,7 @@ void EnZog_Init(Actor* thisx, PlayState* play) { if ((ENZOG_GET_F(&this->actor) != ENZOG_F_2) && (INV_CONTENT(ITEM_MASK_ZORA) == ITEM_MASK_ZORA) && ((play->csCtx.currentCsIndex != 2) || (gSaveContext.sceneLayer != 0) || (play->sceneId != SCENE_30GYOSON))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c b/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c index fba4baf7a4..463f2117eb 100644 --- a/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c +++ b/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c @@ -98,14 +98,14 @@ void EnZoraegg_Init(Actor* thisx, PlayState* play) { switch (ENZORAEGG_GET_1F(&this->actor)) { case ENZORAEGG_1F_00: if (Flags_GetSwitch(play, ENZORAEGG_GET_FE00(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; case ENZORAEGG_1F_11: if (func_80B319A8(play) >= 7) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); this->actor.home.rot.z = 1; return; } @@ -119,7 +119,7 @@ void EnZoraegg_Init(Actor* thisx, PlayState* play) { case ENZORAEGG_1F_08: case ENZORAEGG_1F_09: if (gSaveContext.save.weekEventReg[19] & 0x40) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -132,7 +132,7 @@ void EnZoraegg_Init(Actor* thisx, PlayState* play) { case ENZORAEGG_1F_0F: case ENZORAEGG_1F_10: if (!(gSaveContext.save.weekEventReg[19] & 0x40)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } break; @@ -335,7 +335,7 @@ void func_80B32094(EnZoraegg* this, PlayState* play) { void func_80B320E0(EnZoraegg* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { Flags_SetSwitch(play, ENZORAEGG_GET_FE00(&this->actor)); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80B32094; Message_StartTextbox(play, 0x24B, &this->actor); @@ -406,7 +406,7 @@ void func_80B32390(EnZoraegg* this, PlayState* play) { if (temp_v0 != NULL) { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, temp_v0); gSaveContext.eventInf[3] |= 8; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if ((func_80B319A8(play) >= 7) && (fabsf(player->actor.world.pos.x - this->actor.world.pos.x) < (100.0f * this->actor.scale.x)) && @@ -571,7 +571,7 @@ void func_80B32B3C(EnZoraegg* this, PlayState* play) { void func_80B32B70(EnZoraegg* this, PlayState* play) { func_80B31C40(this, play); if (Cutscene_CheckActorAction(play, 0x1C9)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -584,7 +584,7 @@ void func_80B32BB8(EnZoraegg* this, PlayState* play) { } if (Cutscene_CheckActorAction(play, 0x1C9)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Zos/z_en_zos.c b/src/overlays/actors/ovl_En_Zos/z_en_zos.c index 11fcc25953..2a2f23bb01 100644 --- a/src/overlays/actors/ovl_En_Zos/z_en_zos.c +++ b/src/overlays/actors/ovl_En_Zos/z_en_zos.c @@ -101,7 +101,7 @@ void EnZos_Init(Actor* thisx, PlayState* play) { switch (ENZOS_GET_F(&this->actor)) { case ENZOS_F_1: if (!(gSaveContext.save.weekEventReg[55] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } if (gSaveContext.save.weekEventReg[78] & 1) { @@ -121,7 +121,7 @@ void EnZos_Init(Actor* thisx, PlayState* play) { default: if (gSaveContext.save.weekEventReg[55] & 0x80) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actor.flags |= ACTOR_FLAG_10; break; diff --git a/src/overlays/actors/ovl_En_Zot/z_en_zot.c b/src/overlays/actors/ovl_En_Zot/z_en_zot.c index 1519a37745..db054d1f82 100644 --- a/src/overlays/actors/ovl_En_Zot/z_en_zot.c +++ b/src/overlays/actors/ovl_En_Zot/z_en_zot.c @@ -186,14 +186,14 @@ void EnZot_Init(Actor* thisx, PlayState* play2) { this->actor.colChkInfo.cylRadius = 0; this->actor.shape.yOffset = -1400.0f; if (!(gSaveContext.save.weekEventReg[55] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; case 18: this->actionFunc = func_80B99384; if (!(gSaveContext.save.weekEventReg[55] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } break; @@ -221,7 +221,7 @@ void EnZot_Init(Actor* thisx, PlayState* play2) { } if ((ENZOT_GET_1F(thisx) >= 2) && (ENZOT_GET_1F(thisx) < 11) && (gSaveContext.save.weekEventReg[55] & 0x80)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Zov/z_en_zov.c b/src/overlays/actors/ovl_En_Zov/z_en_zov.c index 05726ddce3..ee7f4cf053 100644 --- a/src/overlays/actors/ovl_En_Zov/z_en_zov.c +++ b/src/overlays/actors/ovl_En_Zov/z_en_zov.c @@ -108,7 +108,7 @@ void EnZov_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80BD1F1C; func_80BD1570(this, 9, ANIMMODE_LOOP); if (!(gSaveContext.save.weekEventReg[55] & 0x80)) { - Actor_MarkForDeath(&this->picto.actor); + Actor_Kill(&this->picto.actor); return; } break; @@ -121,7 +121,7 @@ void EnZov_Init(Actor* thisx, PlayState* play) { default: this->unk_320 |= 2; if ((gSaveContext.save.weekEventReg[55] & 0x80) || (gSaveContext.save.weekEventReg[53] & 0x20)) { - Actor_MarkForDeath(&this->picto.actor); + Actor_Kill(&this->picto.actor); } break; } diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index ac8592615d..afaec44638 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -41,7 +41,7 @@ void ItemBHeart_Init(Actor* thisx, PlayState* play) { ItemBHeart* this = THIS; if (Flags_GetCollectible(play, 0x1F)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -68,10 +68,11 @@ void ItemBHeart_Update(Actor* thisx, PlayState* play) { if (!(this->unk_168 < 0.5f)) { if (Actor_HasParent(&this->actor, play)) { Flags_SetCollectible(play, 0x1F); - Actor_MarkForDeath(&this->actor); - } else { - Actor_PickUp(&this->actor, play, GI_HEART_CONTAINER, 30.0f, 80.0f); + Actor_Kill(&this->actor); + return; } + + Actor_PickUp(&this->actor, play, GI_HEART_CONTAINER, 30.0f, 80.0f); } } diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index 0bd1fd30c2..140599f61a 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -102,15 +102,16 @@ void ItemEtcetera_WaitForObject(ItemEtcetera* this, PlayState* play) { void func_8092009C(ItemEtcetera* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { - Actor_MarkForDeath(&this->actor); - } else { - Actor_PickUp(&this->actor, play, this->getItemId, 30.0f, 50.0f); + Actor_Kill(&this->actor); + return; } + + Actor_PickUp(&this->actor, play, this->getItemId, 30.0f, 50.0f); } void func_809200F8(ItemEtcetera* this, PlayState* play) { if (Flags_GetTreasure(play, ITEMETCETERA_GET_TREASUREFLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c index 1f3fae3ac9..d6e9764169 100644 --- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c +++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c @@ -41,7 +41,7 @@ void ItemInbox_Destroy(Actor* thisx, PlayState* play) { void ItemInbox_Idle(ItemInbox* this, PlayState* play) { if (Flags_GetTreasure(play, (this->actor.params >> 8) & 0x1F)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index dad2ccbc3d..92a54e6b09 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -296,7 +296,7 @@ void MirRay_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); if (MIRRAY_LOCATION(&this->actor) >= MIRRAY_MAX) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->sourcePt.x = dataEntry->sourcePoint.x; diff --git a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c index f0049800d4..5ae0b4ae22 100644 --- a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c +++ b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c @@ -184,10 +184,10 @@ void func_80ACBC8C(ObjAqua* this, PlayState* play) { } else { func_80ACB6A0(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 0x28, NA_SE_EV_BOMB_DROP_WATER); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (this->counter <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -207,7 +207,7 @@ void func_80ACBD48(ObjAqua* this, PlayState* play) { if (this->actor.shape.shadowAlpha > 2) { this->actor.shape.shadowAlpha -= 2; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -232,7 +232,7 @@ void func_80ACBDFC(ObjAqua* this, PlayState* play) { (Rand_ZeroOne() * 0.1f) + 0.03f); } if (this->counter <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index c13fde9b07..9904c6beed 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -378,11 +378,12 @@ void ObjBean_Init(Actor* thisx, PlayState* play) { this->dyna.actor.flags |= ACTOR_FLAG_10; func_80937C10(this); if (!func_80936D58(this, play)) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - func_800BC154(play, &play->actorCtx, &this->dyna.actor, 7); - func_80937DD8(this); + Actor_Kill(&this->dyna.actor); + return; } + + func_800BC154(play, &play->actorCtx, &this->dyna.actor, 7); + func_80937DD8(this); } else { s32 params2 = OBJBEAN_GET_3F00(&this->dyna.actor); Path* path = &play->setupPathList[params2]; @@ -509,7 +510,7 @@ void func_80937DEC(ObjBean* this, PlayState* play) { } if (this->unk_1FF && Flags_GetSwitch(play, OBJBEAN_GET_3F80(&this->dyna.actor, 1))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -714,8 +715,11 @@ void func_80938670(ObjBean* this) { void func_8093868C(ObjBean* this, PlayState* play) { if (this->unk_1B2 <= 0) { - Actor_MarkForDeath(&this->dyna.actor); - } else if (this->unk_1B2 <= 20) { + Actor_Kill(&this->dyna.actor); + return; + } + + if (this->unk_1B2 <= 20) { this->dyna.actor.scale.x *= 0.89f; this->dyna.actor.scale.y *= 0.89f; this->dyna.actor.scale.z *= 0.89f; diff --git a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c index 7f59fe5795..e44a4ffde7 100644 --- a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c +++ b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c @@ -126,7 +126,7 @@ void ObjBigicicle_Init(Actor* thisx, PlayState* play) { this->collider2.dim.yShift = this->collider2.dim.yShift * sp30; if (Flags_GetSwitch(play, this->actor.params)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -285,7 +285,7 @@ void func_80AE939C(ObjBigicicle* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_GLASSBROKEN_IMPACT); ActorCutscene_Stop(this->actor.cutscene); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void ObjBigicicle_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c index 9c35b0298a..98604578ac 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c @@ -33,7 +33,7 @@ void ObjBlockstop_Init(Actor* thisx, PlayState* play) { ObjBlockstop* this = THIS; if (Flags_GetSwitch(play, this->actor.params)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } this->actionFunc = ObjBlockstop_CheckForBlock; } @@ -62,7 +62,7 @@ void ObjBlockstop_TryPlayCutscene(ObjBlockstop* this, PlayState* play) { if (ActorCutscene_GetLength(this->actor.cutscene) != -1) { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } ActorCutscene_SetIntentToPlay(this->actor.cutscene); diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index 27f3e13aa9..99200987c0 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -183,7 +183,7 @@ void ObjBombiwa_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); if (Flags_GetSwitch(play, OBJBOMBIWA_GET_7F(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -350,7 +350,7 @@ void func_80939EF4(ObjBombiwa* this, PlayState* play) { if (params == OBJBOMBIWA_100_0) { func_80939794(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { func_80939994(play, &this->actor.world.pos); this->actor.flags |= ACTOR_FLAG_10; @@ -439,7 +439,7 @@ void func_8093A1F0(ObjBombiwa* this, PlayState* play) { this->unk_201--; if ((this->unk_200 >= 4) || (this->unk_201 <= 0)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c index d387436be3..6f909e770a 100644 --- a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c +++ b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c @@ -83,7 +83,7 @@ void ObjChan_Init(Actor* thisx, PlayState* play) { if (OBJCHAN_SUBTYPE(&this->actor) == OBJCHAN_SUBTYPE_CHANDELIER) { if (sObjChanLoaded) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actor.room = -1; @@ -169,7 +169,7 @@ void ObjChan_InitChandelier(ObjChan* this2, PlayState* play) { true, &sp90)) { this->unk1CC = this->actor.world.pos.y - this->unk1C0.y; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -184,7 +184,7 @@ void ObjChan_InitChandelier(ObjChan* this2, PlayState* play) { temp_v0->myPotIndex = i; temp_v0->actor.cutscene = this->actor.cutscene; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -317,7 +317,7 @@ void ObjChan_PotAction(ObjChan* this, PlayState* play) { this->actor.cutscene, this->actor.unk20, NULL); } } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index ef1feb1a92..e290a108ca 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -335,7 +335,7 @@ void ObjComb_Init(Actor* thisx, PlayState* play) { Collider_InitJntSph(play, &this->collider); if ((sp2C == 1) && OBJCOMB_GET_10(&this->actor) && (gSaveContext.save.weekEventReg[83] & 2)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -383,7 +383,7 @@ void func_8098DC60(ObjComb* this, PlayState* play) { if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x0182C29C) { func_8098CEAC(this, play); func_8098DA74(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { s32 dmgFlags = this->collider.elements->info.acHitInfo->toucher.dmgFlags; @@ -489,7 +489,7 @@ void func_8098E098(ObjComb* this) { void func_8098E0B8(ObjComb* this, PlayState* play) { this->unk_1B4--; if (this->unk_1B4 <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c b/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c index be3f365e36..27440cf621 100644 --- a/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c +++ b/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c @@ -57,23 +57,24 @@ void ObjDanpeilift_Init(Actor* thisx, PlayState* play) { DynaPolyActor_Init(&this->dyna, 1); DynaPolyActor_LoadMesh(play, &this->dyna, &object_obj_danpeilift_Colheader_000BA0); if (this->dyna.bgId == BG_ACTOR_MAX) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); + return; + } + + this->speed = OBJDANPEILIFT_GET_SPEED(thisx); + if (this->speed < 0.0f) { + this->speed = -this->speed; + } + if (this->speed < 0.01f) { + this->actionFunc = ObjDanpeilift_DoNothing; } else { - this->speed = OBJDANPEILIFT_GET_SPEED(thisx); - if (this->speed < 0.0f) { - this->speed = -this->speed; - } - if (this->speed < 0.01f) { - this->actionFunc = ObjDanpeilift_DoNothing; - } else { - path = &play->setupPathList[OBJDANPEILIFT_GET_PATH(thisx)]; - this->curPoint = OBJDANPEILIFT_GET_STARTING_POINT(thisx); - this->endPoint = path->count - 1; - this->direction = 1; - this->points = Lib_SegmentedToVirtual(path->points); - ObjDanpeilift_UpdatePosition(this, this->curPoint); - this->actionFunc = ObjDanpeilift_Move; - } + path = &play->setupPathList[OBJDANPEILIFT_GET_PATH(thisx)]; + this->curPoint = OBJDANPEILIFT_GET_STARTING_POINT(thisx); + this->endPoint = path->count - 1; + this->direction = 1; + this->points = Lib_SegmentedToVirtual(path->points); + ObjDanpeilift_UpdatePosition(this, this->curPoint); + this->actionFunc = ObjDanpeilift_Move; } } diff --git a/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c b/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c index 6cc8e2d048..4a648b7f84 100644 --- a/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c +++ b/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c @@ -34,7 +34,7 @@ void ObjDemo_Init(Actor* thisx, PlayState* play) { thisx->params = OBJDEMO_GET_FF(thisx); if ((thisx->params != OBJDEMO_FF_FF) && (Flags_GetSwitch(play, thisx->params))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (thisx->shape.rot.x < 0) { @@ -96,7 +96,7 @@ void func_80983704(ObjDemo* this, PlayState* play) { if (this->actor.params != 0xFF) { Flags_SetSwitch(play, this->actor.params); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { ActorCutscene_SetIntentToPlay(this->actor.cutscene); @@ -109,7 +109,7 @@ void ObjDemo_Update(Actor* thisx, PlayState* play) { ObjDemo* this = THIS; if ((this->actor.params != 0xFF) && Flags_GetSwitch(play, this->actor.params)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c b/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c index 4c8f383502..f14dd615a9 100644 --- a/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c +++ b/src/overlays/actors/ovl_Obj_Dinner/z_obj_dinner.c @@ -32,7 +32,7 @@ void ObjDinner_Init(Actor* thisx, PlayState* play) { ObjDinner* this = THIS; if (gSaveContext.save.isNight != true || (CURRENT_DAY == 3 && gSaveContext.save.weekEventReg[22] & 1)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Actor_SetScale(&this->actor, 0.1f); } diff --git a/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c b/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c index 0c0177d2f7..3ba7ea655e 100644 --- a/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c +++ b/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.c @@ -46,7 +46,7 @@ s32 ObjDowsing_GetFlag(ObjDowsing* this, PlayState* play) { s32 ObjDowsing_CheckValidSpawn(ObjDowsing* this, PlayState* play) { if (ObjDowsing_GetFlag(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return true; } return false; diff --git a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c index c4ebe8063f..e31c71ba0b 100644 --- a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c +++ b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c @@ -464,7 +464,7 @@ void func_80A1C838(ObjFlowerpot* this, PlayState* play) { } func_80A1BD80(this, play); func_80A1B994(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) && (this->collider.elements[0].info.acHitInfo->toucher.dmgFlags & 0x058BFFBC)) { if (!(this->unk_1EA & 2)) { @@ -475,7 +475,7 @@ void func_80A1C838(ObjFlowerpot* this, PlayState* play) { } func_80A1BA44(this, play); func_80A1B994(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { if (this->collider.elements[1].info.bumperFlags & BUMP_HIT) { if (!(this->unk_1EA & 2)) { @@ -610,7 +610,7 @@ void func_80A1CEF4(ObjFlowerpot* this2, PlayState* play) { } func_80A1BA44(this, play); func_80A1B994(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -624,7 +624,7 @@ void func_80A1CEF4(ObjFlowerpot* this2, PlayState* play) { func_80A1BD80(this, play); func_80A1B994(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c index 343a8f61ed..a9a10f755c 100644 --- a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c +++ b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c @@ -159,7 +159,7 @@ void ObjGhaka_Init(Actor* thisx, PlayState* play) { this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 0x4); if (this->dyna.actor.floorPoly == 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } if (gSaveContext.save.weekEventReg[20] & 0x20) { func_80B3C2C4(this, play); diff --git a/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c b/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c index 11c8619ce1..65008c74a9 100644 --- a/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c +++ b/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c @@ -347,7 +347,7 @@ void ObjGrassCarry_Update(Actor* thisx, PlayState* play) { if (this->unk_190 == NULL) { if ((this->actionFunc != func_809AB610) && (this->actionFunc != func_809AB77C)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } diff --git a/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c b/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c index 8e5a6d4a01..87c62c5d5c 100644 --- a/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c +++ b/src/overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.c @@ -120,13 +120,13 @@ void ObjHakaisi_Init(Actor* thisx, PlayState* play) { } if ((this->switchFlag != -1) && Flags_GetSwitch(play, this->switchFlag)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4); if (this->dyna.actor.floorPoly == NULL) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } func_800C0094(this->dyna.actor.floorPoly, this->dyna.actor.world.pos.x, this->dyna.actor.floorHeight, @@ -406,7 +406,7 @@ void func_80B15330(ObjHakaisi* this, PlayState* play) { if (this->dyna.actor.bgCheckFlags & 2) { func_80B14B6C(this, play, this->dyna.actor.world.pos, 40); func_80B14CF8(play, this->dyna.actor.world.pos, 100, 30, 10); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } Matrix_RotateAxisS(this->unk_19C, &this->unk_184, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index 11baddb384..6c90d670c1 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -181,7 +181,7 @@ void ObjHamishi_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 2.3f); if (Flags_GetSwitch(play, OBJHAMISHI_GET_SWITCHFLAG(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -233,7 +233,7 @@ void ObjHamishi_Update(Actor* thisx, PlayState* play) { func_809A10F4(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN); Flags_SetSwitch(play, OBJHAMISHI_GET_SWITCHFLAG(&this->actor)); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } } diff --git a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c index 3ad2cf5e82..dedea23531 100644 --- a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c +++ b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c @@ -341,7 +341,7 @@ void ObjHugebombiwa_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); if (Flags_GetSwitch(play, ENHUGEBOMBIWA_GET_7F(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -524,7 +524,7 @@ void func_80A55064(ObjHugebombiwa* this, PlayState* play) { this->unk_4B2--; if ((this->unk_4B0 >= 20) || (this->unk_4B2 <= 0)) { ActorCutscene_Stop(this->actor.cutscene); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -620,7 +620,7 @@ void func_80A55564(ObjHugebombiwa* this, PlayState* play) { this->unk_4B2--; if ((this->unk_4B0 >= 20) || (this->unk_4B2 <= 0)) { ActorCutscene_Stop(this->actor.cutscene); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c b/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c index 384d1cbad2..dc4ebb7ef3 100644 --- a/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c +++ b/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c @@ -239,7 +239,7 @@ void ObjHunsui_Init(Actor* thisx, PlayState* play) { this->dyna.actor.shape.rot.z = 0; this->dyna.actor.room = -1; } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } break; @@ -253,7 +253,7 @@ void ObjHunsui_Init(Actor* thisx, PlayState* play) { this->dyna.actor.shape.rot.z = 0; this->dyna.actor.room = -1; } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } break; @@ -269,7 +269,7 @@ void ObjHunsui_Init(Actor* thisx, PlayState* play) { this->dyna.actor.room = -1; this->actionFunc = func_80B9D714; // clang-format on } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } break; @@ -431,7 +431,7 @@ void func_80B9D120(ObjHunsui* this, PlayState* play) { D_80B9DED8.unk_02 = 0; break; } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -536,7 +536,7 @@ void func_80B9D508(ObjHunsui* this, PlayState* play) { D_80B9DED8.unk_02 = 0; break; } - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -574,7 +574,7 @@ void func_80B9D714(ObjHunsui* this, PlayState* play) { if ((this->unk_16C != play->roomCtx.curRoom.num) && (this->unk_16C != play->roomCtx.prevRoom.num) && (this->unk_16D != play->roomCtx.curRoom.num) && (this->unk_16D != play->roomCtx.prevRoom.num)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } else { if (Flags_GetSwitch(play, this->unk_168)) { this->unk_172 &= ~2; diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 2ba1e4352d..69e542c6be 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -117,7 +117,7 @@ void ObjIcePoly_Init(Actor* thisx, PlayState* play) { if (((this->unk_149 != OBJICEPOLY_FF_FF) && Flags_GetSwitch(play, this->unk_149)) || ((play->sceneId == SCENE_KAJIYA) && (gSaveContext.save.weekEventReg[33] & 0x80))) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } @@ -269,12 +269,13 @@ void func_80931E58(ObjIcePoly* this, PlayState* play) { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor); if (this->unk_14A == 1) { func_80931828(this, play); - Actor_MarkForDeath(&this->actor); - } else { - this->unk_14A = 40; - Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_ICE_MELT); - this->actionFunc = func_80931EEC; + Actor_Kill(&this->actor); + return; } + + this->unk_14A = 40; + Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_ICE_MELT); + this->actionFunc = func_80931EEC; } else { ActorCutscene_SetIntentToPlay(this->actor.cutscene); } @@ -330,7 +331,7 @@ void func_80931EEC(ObjIcePoly* this, PlayState* play) { if (this->unk_149 != OBJICEPOLY_FF_FF) { Flags_SetSwitch(play, this->unk_149); } - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c index b01f22ae67..9e351dc234 100644 --- a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c +++ b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c @@ -1410,7 +1410,7 @@ void func_80A266E0(ObjIceblock* this, PlayState* play) { func_80A2508C(this, play); if (sp20) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c b/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c index 57e0f4b2e5..5d28d1790c 100644 --- a/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c +++ b/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c @@ -42,7 +42,7 @@ void ObjJgGakki_Init(Actor* thisx, PlayState* play2) { } else if ((play->sceneId == SCENE_17SETUGEN) || (play->sceneId == SCENE_10YUKIYAMANOMURA)) { Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } Actor_SetScale(&this->actor, 0.01f); } diff --git a/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c b/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c index 28c10781db..37221acca4 100644 --- a/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c +++ b/src/overlays/actors/ovl_Obj_Kepn_Koya/z_obj_kepn_koya.c @@ -41,7 +41,7 @@ void ObjKepnKoya_Init(Actor* thisx, PlayState* play) { DynaPolyActor_Init(&this->dyna, 0); DynaPolyActor_LoadMesh(play, &this->dyna, &object_kepn_koya_Colheader_00805C); if (this->dyna.bgId == BG_ACTOR_MAX) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 9bd2e0442f..b95130ff8d 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -151,7 +151,7 @@ void ObjKibako_Init(Actor* thisx, PlayState* play2) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->bankIndex = Object_GetIndex(&play->objectCtx, sObjectIdList[whichBankIndex]); if (this->bankIndex < 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->unk199 = this->actor.room; @@ -284,12 +284,12 @@ void ObjKibako_Idle(ObjKibako* this, PlayState* play) { ObjKibako_SpawnCollectible(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else if (this->collider.base.acFlags & AC_HIT) { ObjKibako_AirBreak(this, play); ObjKibako_SpawnCollectible(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { Actor_MoveWithGravity(&this->actor); func_809262BC(this); @@ -388,14 +388,14 @@ void ObjKibako_Thrown(ObjKibako* this, PlayState* play) { ObjKibako_AirBreak(this, play); ObjKibako_SpawnCollectible(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { if (this->actor.bgCheckFlags & 0x40) { ObjKibako_WaterBreak(this, play); ObjKibako_SpawnCollectible(this, play); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { if (this->actor.velocity.y < -0.05f) { this->actor.gravity = -2.3f; diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index d32e7a2cda..aff712f401 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -221,7 +221,7 @@ void ObjKibako2_Idle(ObjKibako2* this, PlayState* play) { void ObjKibako2_Kill(ObjKibako2* this, PlayState* play) { ObjKibako2_SpawnContents(this, play); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } void ObjKibako2_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c b/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c index 24597e4aa1..6ff98b96e8 100644 --- a/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c +++ b/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c @@ -49,7 +49,7 @@ void ObjKinoko_Update(Actor* thisx, PlayState* play) { thisx->flags |= ACTOR_FLAG_1; if (Actor_HasParent(thisx, play)) { Flags_SetCollectible(play, OBJ_KINOKO_GET_FLAG(thisx)); - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } Actor_PickUp(thisx, play, GI_MAX, 20.0f, 10.0f); diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 4668bfffd4..efe79c7adb 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -102,14 +102,15 @@ void ObjLift_Init(Actor* thisx, PlayState* play) { this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z; DynaPolyActor_Init(&this->dyna, 1); if ((this->unk_178 <= 0) && (Flags_GetSwitch(play, OBJLIFT_GET_7F(&this->dyna.actor)))) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - DynaPolyActor_LoadMesh(play, &this->dyna, &gDampeGraveBrownElevatorCol); - this->unk_160 = Rand_Next() >> 0x10; - this->unk_162 = Rand_Next() >> 0x10; - this->unk_164 = Rand_Next() >> 0x10; - func_8093D760(this); + Actor_Kill(&this->dyna.actor); + return; } + + DynaPolyActor_LoadMesh(play, &this->dyna, &gDampeGraveBrownElevatorCol); + this->unk_160 = Rand_Next() >> 0x10; + this->unk_162 = Rand_Next() >> 0x10; + this->unk_164 = Rand_Next() >> 0x10; + func_8093D760(this); } void ObjLift_Destroy(Actor* thisx, PlayState* play) { @@ -196,7 +197,7 @@ void func_8093DA48(ObjLift* this, PlayState* play) { func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId); } else { Flags_SetSwitch(play, OBJLIFT_GET_7F(&this->dyna.actor)); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } } diff --git a/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c b/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c index 6884526ee6..6fe341dcc8 100644 --- a/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c +++ b/src/overlays/actors/ovl_Obj_Lightblock/z_obj_lightblock.c @@ -93,17 +93,18 @@ void ObjLightblock_Init(Actor* thisx, PlayState* play) { DynaPolyActor_Init(&this->dyna, 0); Collider_InitCylinder(play, &this->collider); if (Flags_GetSwitch(play, LIGHTBLOCK_DESTROYED(&this->dyna.actor))) { - Actor_MarkForDeath(&this->dyna.actor); - } else { - DynaPolyActor_LoadMesh(play, &this->dyna, &object_lightblock_Colheader_000B80); - Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); - Collider_UpdateCylinder(&this->dyna.actor, &this->collider); - this->collider.dim.radius = typeVars->radius; - this->collider.dim.height = typeVars->height; - this->collider.dim.yShift = typeVars->yShift; - this->alpha = 255; - func_80AF3AC8(this); + Actor_Kill(&this->dyna.actor); + return; } + + DynaPolyActor_LoadMesh(play, &this->dyna, &object_lightblock_Colheader_000B80); + Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); + Collider_UpdateCylinder(&this->dyna.actor, &this->collider); + this->collider.dim.radius = typeVars->radius; + this->collider.dim.height = typeVars->height; + this->collider.dim.yShift = typeVars->yShift; + this->alpha = 255; + func_80AF3AC8(this); } void ObjLightblock_Destroy(Actor* thisx, PlayState* play) { @@ -167,8 +168,11 @@ void func_80AF3C34(ObjLightblock* this, PlayState* play) { if (this->timer <= 0) { temp_a0 = this->dyna.actor.cutscene; ActorCutscene_Stop(temp_a0); - Actor_MarkForDeath(&this->dyna.actor); - } else if (this->timer <= 60) { + Actor_Kill(&this->dyna.actor); + return; + } + + if (this->timer <= 60) { if (this->alpha > 40) { this->alpha -= 40; } else { diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index dafd9bc2c6..7272f62c0d 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -173,7 +173,7 @@ void ObjLightswitch_Init(Actor* thisx, PlayState* play) { } if (isTriggered) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -315,10 +315,11 @@ void ObjLightSwitch_Fade(ObjLightswitch* this, PlayState* play) { this->colorAlpha -= 200; ObjLightswitch_SpawnEffects(this, play); // spawn burning fire effect if (this->colorAlpha < 0) { - Actor_MarkForDeath(&this->actor); - } else { - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // "burn into ashes" + Actor_Kill(&this->actor); + return; } + + func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // "burn into ashes" } void ObjLightswitch_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index 90aa5fa405..5adfb7aa6a 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -54,7 +54,7 @@ void ObjMakekinsuta_Init(Actor* thisx, PlayState* play) { this->unk144 = -1; } if (Flags_GetSwitch(play, OBJMAKEKINSUTA_GET_SWITCH_FLAGS(thisx))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index b5f9d67b29..05fa6b3948 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -68,7 +68,7 @@ void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play) { childPoint = &this->pathPoints[childPointIndex]; if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_OBJ_OSHIHIKI, childPoint->x, childPoint->y, childPoint->z, 0, 0, 0, 0xFFF1) == NULL) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c b/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c index e1b1bc1b97..9e3ac57d64 100644 --- a/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c +++ b/src/overlays/actors/ovl_Obj_Milk_Bin/z_obj_milk_bin.c @@ -76,7 +76,7 @@ void ObjMilkBin_Update(Actor* thisx, PlayState* play2) { if (this->type == OBJ_MILK_BIN_TYPE_1) { if (gSaveContext.save.weekEventReg[22] & 1) { if (((gSaveContext.save.day == 2) && (gSaveContext.save.isNight == 1)) || (gSaveContext.save.day >= 3)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } } diff --git a/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c b/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c index 31ba1fa630..5d1931c1c6 100644 --- a/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c +++ b/src/overlays/actors/ovl_Obj_Moon_Stone/z_obj_moon_stone.c @@ -57,7 +57,7 @@ void ObjMoonStone_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; func_80C0673C(this); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -129,7 +129,7 @@ void func_80C0685C(ObjMoonStone* this) { void func_80C06870(ObjMoonStone* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { gSaveContext.save.weekEventReg[74] |= 0x40; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c b/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c index 3b1b72f2f3..52f3dd4e9e 100644 --- a/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c +++ b/src/overlays/actors/ovl_Obj_Mu_Pict/z_obj_mu_pict.c @@ -41,7 +41,7 @@ void ObjMuPict_Init(Actor* thisx, PlayState* play) { ObjMuPict* this = THIS; if (!(gSaveContext.save.weekEventReg[75] & 0x20) && !(gSaveContext.save.weekEventReg[52] & 0x20)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } func_80C06D90(this, play); diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index 9a8072edd8..0297b7da47 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -96,15 +96,15 @@ void ObjMure_Init(Actor* thisx, PlayState* play) { this->svNum = OBJ_MURE_GET_SVNUM(&this->actor); this->type = OBJ_MURE_GET_TYPE(&this->actor); if (this->ptn >= 4) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (this->type >= OBJMURE_TYPE_MAX) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } if (!func_808D7928(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } this->actionFunc = ObjMure_InitialAction; @@ -207,7 +207,7 @@ void ObjMure_KillActorsImpl(ObjMure* this, PlayState* play) { break; case OBJMURE_CHILD_STATE_2: if (this->children[i] != NULL) { - Actor_MarkForDeath(this->children[i]); + Actor_Kill(this->children[i]); this->children[i] = NULL; } break; @@ -216,7 +216,7 @@ void ObjMure_KillActorsImpl(ObjMure* this, PlayState* play) { if (Actor_HasParent(this->children[i], play)) { this->children[i] = NULL; } else { - Actor_MarkForDeath(this->children[i]); + Actor_Kill(this->children[i]); this->children[i] = NULL; } } diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c index edefba93a7..e0322f61a3 100644 --- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -118,7 +118,7 @@ void func_8098F364(ObjMure3* this, s32 play) { if (((*collectible)->unk1A4 != 0) || ((*collectible)->actor.update == NULL)) { this->unk164 |= (1 << i); } else { - Actor_MarkForDeath(&(*collectible)->actor); + Actor_Kill(&(*collectible)->actor); } } *collectible = NULL; @@ -148,7 +148,7 @@ void ObjMure3_Init(Actor* thisx, PlayState* play) { ObjMure3* this = THIS; if (Flags_GetSwitch(play, OBJMURE3_PARAMS_7F(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } Actor_ProcessInitChain(&this->actor, sInitChain); diff --git a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c index 7cc7add22e..fddc5a9a9f 100644 --- a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c +++ b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c @@ -96,7 +96,7 @@ void func_80BA2514(ObjNozoki* this, PlayState* play) { s32 sp24 = Object_GetIndex(&play->objectCtx, D_80BA34B8[this->unk_15C]); if (sp24 < 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -328,7 +328,7 @@ void func_80BA2C94(ObjNozoki* this, PlayState* play) { if (play->actorCtx.flags & ACTORCTX_FLAG_6) { if (sp34 <= 5.0f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } else if (!(play->actorCtx.flags & ACTORCTX_FLAG_5) && (GET_PLAYER(play)->actor.id == ACTOR_PLAYER) && Flags_GetSwitch(play, OBJNOZOKI_GET_SWITCHFLAG2(&this->dyna.actor)) && (sp38 < 20.0f)) { @@ -347,7 +347,7 @@ void func_80BA2C94(ObjNozoki* this, PlayState* play) { sp38 = this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y; if (sp38 >= 100.0f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } this->dyna.actor.shape.rot.x = -0x1F40 - (s16)(sp38 * 400.0f); diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 4bfb5ba968..d4d716e90f 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -205,7 +205,7 @@ void ObjOshihiki_Init(Actor* thisx, PlayState* play) { case OBJOSHIHIKI_F_0: case OBJOSHIHIKI_F_1: case OBJOSHIHIKI_F_2: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } } else { @@ -213,7 +213,7 @@ void ObjOshihiki_Init(Actor* thisx, PlayState* play) { case OBJOSHIHIKI_F_3: case OBJOSHIHIKI_F_4: case OBJOSHIHIKI_F_5: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } } @@ -293,7 +293,7 @@ s32 ObjOshihiki_CheckFloor(ObjOshihiki* this, PlayState* play) { s32 ObjOshihiki_CheckGround(ObjOshihiki* this, PlayState* play) { if (this->dyna.actor.world.pos.y <= BGCHECK_Y_MIN + 10.0f) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return false; } diff --git a/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c b/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c index 6255b2cbe1..e1ec0470c1 100644 --- a/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c +++ b/src/overlays/actors/ovl_Obj_Purify/z_obj_purify.c @@ -135,11 +135,11 @@ void ObjPurify_Init(Actor* thisx, PlayState* play) { } this->objIndex = Object_GetIndex(&play->objectCtx, info->objectId); if (this->objIndex < 0) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } else if (sp20 == 0) { func_80A84EAC(this); } else if (ObjPurify_IsPurified(this)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } else { func_80A84EAC(this); } @@ -183,7 +183,7 @@ void func_80A84FA0(ObjPurify* this) { void func_80A84FB4(ObjPurify* this, PlayState* play) { if (ObjPurify_IsPurified(this)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index 0ce2f38a16..64db63a58b 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -69,7 +69,7 @@ void func_80973D3C(ObjRoomtimer* this, PlayState* play) { } else if ((this->actor.params != 0x1FF) && (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] == TIMER_STATE_OFF)) { play_sound(NA_SE_OC_ABYSS); func_80169EFC(&play->state); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -80,10 +80,11 @@ void func_80973DE0(ObjRoomtimer* this, PlayState* play) { if (ActorCutscene_GetLength(this->actor.cutscene) != -1) { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor); } - Actor_MarkForDeath(&this->actor); - } else { - ActorCutscene_SetIntentToPlay(this->actor.cutscene); + Actor_Kill(&this->actor); + return; } + + ActorCutscene_SetIntentToPlay(this->actor.cutscene); } void ObjRoomtimer_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c b/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c index 72f4526822..bbfc25a641 100644 --- a/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c +++ b/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.c @@ -510,7 +510,7 @@ void ObjSnowball_Init(Actor* thisx, PlayState* play) { func_80B04338(this, play); if ((sp40 == 5) && Flags_GetSwitch(play, OBJSNOWBALL_GET_3F(&this->actor))) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -621,7 +621,7 @@ void func_80B04648(ObjSnowball* this, PlayState* play) { if (this->actor.home.rot.y == 1) { func_80B04B48(this, play); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else if (this->unk_208 == 0x2D) { func_80B03688(this, play); @@ -725,7 +725,7 @@ void func_80B047C0(ObjSnowball* this, PlayState* play) { if (this->actor.home.rot.y == 1) { func_80B04B48(this, play); } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } else { for (i = 0; i < ARRAY_COUNT(this->unk_1A8); i++) { diff --git a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c index 74fa8fd578..ec6bd9edaa 100644 --- a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c +++ b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c @@ -365,7 +365,7 @@ void func_80B39C9C(ObjSnowball2* this, PlayState* play) { func_80B38E88(this, play); func_80B39108(this, play); func_80B39B5C(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } else { if (sp38 && (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 2)) { @@ -464,7 +464,7 @@ void func_80B3A13C(ObjSnowball2* this, PlayState* play) { func_80B38E88(this, play); func_80B39108(this, play); func_80B39B5C(this, play); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } @@ -570,7 +570,7 @@ void func_80B3A500(ObjSnowball2* this, PlayState* play) { } if (this->unk_1AC <= 0) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c index 05fe851a9c..2a0a722a58 100644 --- a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c +++ b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c @@ -565,7 +565,7 @@ void ObjSpidertent_Init(Actor* thisx, PlayState* play) { Collider_InitTris(play, &this->collider); if (Flags_GetSwitch(play, OBJSPIDERTENT_GET_7F00(&this->dyna.actor))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -792,7 +792,7 @@ void func_80B30AF8(ObjSpidertent* this, PlayState* play) { } } else if (this->unk_3C1 <= 0) { ActorCutscene_Stop(this->dyna.actor.cutscene); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } diff --git a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c index c57db1111e..f2333712f1 100644 --- a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c +++ b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c @@ -500,7 +500,7 @@ void ObjSpinyroll_Init(Actor* thisx, PlayState* play) { ((sp34->x == sp30->x) && (sp34->y == sp30->y) && (sp34->z != sp30->z))) { this->unk_49C = false; } else { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } diff --git a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c index c7aa4549d6..b1baf84699 100644 --- a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c +++ b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c @@ -204,7 +204,7 @@ void ObjTaru_Init(Actor* thisx, PlayState* play) { if (OBJ_TARU_GET_80(thisx)) { if (Flags_GetSwitch(play, OBJ_TARU_GET_7F(thisx))) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } else { DynaPolyActor_LoadMesh(play, &this->dyna, &object_taru_Colheader_001CB0); } @@ -292,17 +292,18 @@ void func_80B9C07C(ObjTaru* this, PlayState* play) { void func_80B9C174(ObjTaru* this, PlayState* play) { func_80B9BD84(this, play); - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } void func_80B9C1A0(ObjTaru* this, PlayState* play) { if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) { ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor); Flags_SetSwitch(play, OBJ_TARU_GET_7F(&this->dyna.actor)); - Actor_MarkForDeath(&this->dyna.actor); - } else { - ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene); + Actor_Kill(&this->dyna.actor); + return; } + + ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene); } void ObjTaru_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c index a37f64b849..146c46428c 100644 --- a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c +++ b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c @@ -132,13 +132,13 @@ void ObjToge_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); if (OBJTOGE_GET_PATH(thisx) == 0xFF) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } path = &play->setupPathList[OBJTOGE_GET_PATH(thisx)]; if (path->count != 2) { - Actor_MarkForDeath(thisx); + Actor_Kill(thisx); return; } diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index eccc9c2c3c..1f1c9c4a3b 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -190,20 +190,21 @@ void ObjTsubo_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->objBankIndex = Object_GetIndex(&play->objectCtx, sPotTypeData[type].objId); if (this->objBankIndex < 0) { - Actor_MarkForDeath(&this->actor); - } else { - this->actor.shape.shadowScale = 1.8f; - this->homeRoom = this->actor.room; - if ((type != OBJ_TSUBO_TYPE_3) && (sp2C != 2)) { - if (Item_CanDropBigFairy(play, OBJ_TSUBO_P003F(&this->actor), OBJ_TSUBO_PFE00(&this->actor))) { - this->unk_198 = true; - } - } - if ((type == OBJ_TSUBO_TYPE_3) || (sp2C != 2) || !func_809275C0(this, play)) { - this->unk_19A = -1; - } - func_80928914(this); + Actor_Kill(&this->actor); + return; } + + this->actor.shape.shadowScale = 1.8f; + this->homeRoom = this->actor.room; + if ((type != OBJ_TSUBO_TYPE_3) && (sp2C != 2)) { + if (Item_CanDropBigFairy(play, OBJ_TSUBO_P003F(&this->actor), OBJ_TSUBO_PFE00(&this->actor))) { + this->unk_198 = true; + } + } + if ((type == OBJ_TSUBO_TYPE_3) || (sp2C != 2) || !func_809275C0(this, play)) { + this->unk_19A = -1; + } + func_80928914(this); } void ObjTsubo_Destroy(Actor* thisx, PlayState* play2) { @@ -485,7 +486,7 @@ void func_809289E4(ObjTsubo* this, PlayState* play) { func_80927818(this, play, 1); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN); if (ObjTsubo_IsSceneNotGohtOrTwinmold(this, play)) { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } else { func_809291DC(this); } @@ -576,10 +577,11 @@ void func_80928F18(ObjTsubo* this, PlayState* play) { } SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN); if (ObjTsubo_IsSceneNotGohtOrTwinmold(this, play)) { - Actor_MarkForDeath(&this->actor); - } else { - func_809291DC(this); + Actor_Kill(&this->actor); + return; } + + func_809291DC(this); } else if (this->actor.bgCheckFlags & 0x40) { typeData->breakPot2(this, play); if (type == OBJ_TSUBO_TYPE_3) { @@ -590,10 +592,11 @@ void func_80928F18(ObjTsubo* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L); if (ObjTsubo_IsSceneNotGohtOrTwinmold(this, play)) { - Actor_MarkForDeath(&this->actor); - } else { - func_809291DC(this); + Actor_Kill(&this->actor); + return; } + + func_809291DC(this); } else { Actor_MoveWithGravity(&this->actor); Math_StepToS(&D_80929504, D_80929500, 150); diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c index 63fe325012..ce2dd0aba2 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c @@ -684,7 +684,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { // if (!AliensDefeated) if (!(gSaveContext.save.weekEventReg[22] & 1)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -705,7 +705,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { if ((gSaveContext.save.weekEventReg[34] & 0x80) || gSaveContext.save.time >= CLOCK_TIME(19, 0) || gSaveContext.save.time <= CLOCK_TIME(6, 0) || (gSaveContext.save.weekEventReg[52] & 1) || (gSaveContext.save.weekEventReg[52] & 2)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -715,7 +715,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { } } else if (this->type == OBJ_UM_TYPE_PRE_MILK_RUN) { if (!(gSaveContext.save.weekEventReg[31] & 0x80) || (gSaveContext.save.weekEventReg[52] & 1)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -729,7 +729,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { } } else if (this->type == OBJ_UM_TYPE_MILK_RUN_MINIGAME) { if (!(gSaveContext.save.weekEventReg[31] & 0x80)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -741,7 +741,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { ObjUm_RotatePlayer(this, play, 0); } else if (this->type == OBJ_UM_TYPE_POST_MILK_RUN) { if (!(gSaveContext.save.weekEventReg[52] & 1) || (gSaveContext.save.weekEventReg[59] & 2)) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -768,7 +768,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { } if (this->dyna.bgId == BGCHECK_SCENE) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -780,7 +780,7 @@ void ObjUm_Init(Actor* thisx, PlayState* play) { this->dyna.actor.shape.rot.y, 0, ENHORSE_PARAMS(ENHORSE_PARAM_DONKEY, ENHORSE_18)); if (this->donkey == NULL) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); return; } @@ -802,11 +802,11 @@ void ObjUm_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->banditsCollisions[1]); } -// ObjUm_MarkMyDonkeyAndMyselfForDeath, ObjUm_TerminateMe, ObjUmn't, ObjUm_Asinucide +// ObjUm_KillMyDonkeyAndMyself, ObjUm_TerminateMe, ObjUmn't, ObjUm_Asinucide void func_80B79524(ObjUm* this) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); if (this->donkey != NULL) { - Actor_MarkForDeath(&this->donkey->actor); + Actor_Kill(&this->donkey->actor); } } diff --git a/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c b/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c index 33ebf1e500..69a878aea8 100644 --- a/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c +++ b/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c @@ -88,7 +88,7 @@ s32 func_80C07CD0(void) { void func_80C07DC4(ObjUsiyane* this, PlayState* play) { if (func_80C07CD0()) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } } @@ -166,7 +166,7 @@ void func_80C081C8(ObjUsiyane* this, PlayState* play) { } } else if (this->unk_740 >= 70) { - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); } this->unk_740++; } @@ -213,7 +213,7 @@ void ObjUsiyane_Init(Actor* thisx, PlayState* play) { break; default: - Actor_MarkForDeath(&this->dyna.actor); + Actor_Kill(&this->dyna.actor); break; } } diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c index aea3bc7f1a..c418f65af8 100644 --- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c +++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c @@ -41,9 +41,12 @@ void func_808A7954(ObjWturn* this) { void func_808A7968(ObjWturn* this, PlayState* play) { if (play->msgCtx.ocarinaMode >= 28 && play->msgCtx.ocarinaMode < 39) { Flags_UnsetSwitch(play, this->actor.params); - Actor_MarkForDeath(&this->actor); - } else if ((Flags_GetSwitch(play, this->actor.params) && (play->sceneId == SCENE_F40)) || - (!Flags_GetSwitch(play, this->actor.params) && (play->sceneId == SCENE_F41))) { + Actor_Kill(&this->actor); + return; + } + + if ((Flags_GetSwitch(play, this->actor.params) && (play->sceneId == SCENE_F40)) || + (!Flags_GetSwitch(play, this->actor.params) && (play->sceneId == SCENE_F41))) { func_808A7A24(this); } } diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 264167db52..e4a6a86271 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -125,7 +125,7 @@ void ObjectKankyo_Init(Actor* thisx, PlayState* play) { void ObjectKankyo_Destroy(Actor* thisx, PlayState* play) { ObjectKankyo* this = THIS; - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void func_808DC18C(ObjectKankyo* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 7eaf78c209..fe56ce03ae 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -79,7 +79,7 @@ void OceffSpot_End(OceffSpot* this, PlayState* play) { if (this->unk16C > 0.0f) { this->unk16C -= 0.05f; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); if ((REG(15) != 0x190) && (play->msgCtx.unk12046 == 0)) { if ((play->msgCtx.ocarinaAction != 0x39) || (play->msgCtx.ocarinaMode != 0xA)) { gSaveContext.sunsSongState = SUNSSONG_START; diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 3a4faceea2..eff8a7dcc5 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -150,7 +150,7 @@ void OceffStorm_DefaultAction(OceffStorm* this, PlayState* play) { if (this->counter < 70) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index ef1fa10350..ba71cc2675 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -51,7 +51,7 @@ void OceffWipe_Update(Actor* thisx, PlayState* play) { if (this->counter < 100) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 54672f173d..0c93d51a8f 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -53,7 +53,7 @@ void OceffWipe2_Update(Actor* thisx, PlayState* play) { if (this->timer < 100) { this->timer++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index 4837f69493..c7c9249a72 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -54,7 +54,7 @@ void OceffWipe3_Update(Actor* thisx, PlayState* play) { if (this->counter < 100) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 18fecfe718..9c7b8853bf 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -53,7 +53,7 @@ void OceffWipe4_Update(Actor* thisx, PlayState* play) { if (this->counter < 50) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c b/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c index 951ba1c39a..16053e92e9 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c +++ b/src/overlays/actors/ovl_Oceff_Wipe5/z_oceff_wipe5.c @@ -51,7 +51,7 @@ void OceffWipe5_Update(Actor* thisx, PlayState* play) { if (this->counter < 100) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c b/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c index 97c688434b..c5d5361160 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c +++ b/src/overlays/actors/ovl_Oceff_Wipe6/z_oceff_wipe6.c @@ -49,7 +49,7 @@ void OceffWipe6_Update(Actor* thisx, PlayState* play) { if (this->counter < 100) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c index abd01e1ff6..c129fe1681 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c +++ b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c @@ -53,7 +53,7 @@ void OceffWipe7_Update(Actor* thisx, PlayState* play) { if (this->counter < 100) { this->counter++; } else { - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 1aa2e545e9..fa0121fe6e 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -98,7 +98,7 @@ void ShotSun_SpawnFairy(ShotSun* this, PlayState* play2) { } Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, 0, 0, fairyType); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } } @@ -164,8 +164,11 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) { } } - Actor_MarkForDeath(&this->actor); - } else if (!(this->actor.xzDistToPlayer > 120.0f)) { + Actor_Kill(&this->actor); + return; + } + + if (!(this->actor.xzDistToPlayer > 120.0f)) { if ((gSaveContext.save.time >= CLOCK_TIME(6, 30)) && (gSaveContext.save.time < CLOCK_TIME(7, 30))) { cylinderPos.x = player->bodyPartsPos[7].x + (play->envCtx.unk_4 * (1.0f / 6.0f)); cylinderPos.y = (player->bodyPartsPos[7].y - 30.0f) + (play->envCtx.unk_8 * (1.0f / 6.0f)); diff --git a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c index c79697e97a..f54fb4973b 100644 --- a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c +++ b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c @@ -84,7 +84,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, PlayState* play) { actor = actor->next; } while (actor != NULL); - Actor_MarkForDeath(&this->actor); + Actor_Kill(&this->actor); } void TGSw_Init(Actor* thisx, PlayState* play) { diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index b77506370c..b199ada05b 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -703,7 +703,7 @@ 0x800B6584:("func_800B6584",), 0x800B6608:("func_800B6608",), 0x800B6680:("func_800B6680",), - 0x800B670C:("Actor_MarkForDeath",), + 0x800B670C:("Actor_Kill",), 0x800B672C:("Actor_SetWorldToHome",), 0x800B675C:("Actor_SetFocus",), 0x800B67A0:("Actor_SetWorldRotToShape",), @@ -13136,8 +13136,8 @@ 0x80B1861C:("EnSnowman_Dead",), 0x80B18908:("EnSnowman_SetupSplitDoNothing",), 0x80B189C4:("EnSnowman_SplitDoNothing",), - 0x80B189D4:("EnSnowman_SetupMarkForDeath",), - 0x80B18A04:("EnSnowman_MarkForDeath",), + 0x80B189D4:("EnSnowman_SetupKill",), + 0x80B18A04:("EnSnowman_Kill",), 0x80B18A28:("EnSnowman_CreateSplitEeno",), 0x80B18B30:("EnSnowman_AbsorbEeno",), 0x80B18BB4:("EnSnowman_SetupCombine",), diff --git a/tools/namefixer.py b/tools/namefixer.py index 1aed5ead36..aba4a5aa41 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -114,6 +114,7 @@ wordReplace = { "Actor_IsActorFacingActorAndWithinRange": "Actor_ActorAIsFacingAndNearActorB", "Actor_IsActorFacingActor": "Actor_ActorAIsFacingActorB", "Actor_IsActorFacedByActor": "Actor_ActorBIsFacingActorA", + "Actor_MarkForDeath": "Actor_Kill", "func_800B84D0": "Actor_ProcessTalkRequest", "func_8017D668": "Math3D_PointDistToLine2D", "func_800BDFC0": "Gfx_DrawDListOpa", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index f1d994d115..a2d2354ff7 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -217,7 +217,7 @@ asm/non_matchings/code/z_actor/func_800B64FC.s,func_800B64FC,0x800B64FC,0x22 asm/non_matchings/code/z_actor/func_800B6584.s,func_800B6584,0x800B6584,0x21 asm/non_matchings/code/z_actor/func_800B6608.s,func_800B6608,0x800B6608,0x1E asm/non_matchings/code/z_actor/func_800B6680.s,func_800B6680,0x800B6680,0x23 -asm/non_matchings/code/z_actor/Actor_MarkForDeath.s,Actor_MarkForDeath,0x800B670C,0x8 +asm/non_matchings/code/z_actor/Actor_Kill.s,Actor_Kill,0x800B670C,0x8 asm/non_matchings/code/z_actor/Actor_SetWorldToHome.s,Actor_SetWorldToHome,0x800B672C,0xC asm/non_matchings/code/z_actor/Actor_SetFocus.s,Actor_SetFocus,0x800B675C,0x11 asm/non_matchings/code/z_actor/Actor_SetWorldRotToShape.s,Actor_SetWorldRotToShape,0x800B67A0,0x8