diff --git a/include/z64actor.h b/include/z64actor.h index 785cec9cde..3d63248c02 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -140,11 +140,11 @@ typedef struct ActorShape { // Actor will retain this flag until `Actor_TalkOfferAccepted` is called or manually turned off by the actor #define ACTOR_FLAG_TALK (1 << 8) -// -#define ACTOR_FLAG_9 (1 << 9) +// When the hookshot attaches to this actor, the actor will be pulled back as the hookshot retracts. +#define ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR (1 << 9) -// -#define ACTOR_FLAG_10 (1 << 10) +// When the hookshot attaches to this actor, Player will be pulled by the hookshot and fly to the actor. +#define ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER (1 << 10) // A clump of grass (EN_KUSA) has been destroyed. // This flag is used to communicate with the spawner actor (OBJ_MURE). @@ -154,11 +154,11 @@ typedef struct ActorShape { #define ACTOR_FLAG_IGNORE_QUAKE (1 << 12) // The hookshot is currently attached to this actor. -// The behavior that occurs after attachment is determined by `ACTOR_FLAG_9` and `ACTOR_FLAG_10`. +// The behavior that occurs after attachment is determined by `ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR` and `ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER`. // If neither of those flags are set attachment cannot occur, and the hookshot will simply act as a damage source. // // This flag is also reused to indicate that an actor is attached to the boomerang. -// This only has an effect for Gold Skulltula Tokens (EN_SI) which has overlapping behavior for hookshot and boomerang +// This only has an effect for Gold Skulltula Tokens (EN_SI) which has overlapping behavior for hookshot and boomerang. #define ACTOR_FLAG_HOOKSHOT_ATTACHED (1 << 13) // When hit by an arrow, the actor will be able to attach to the arrow and fly with it in the air 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 6baa55be3f..4b475c9c66 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -94,7 +94,12 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) { } } -void func_80865044(ArmsHook* this) { +/** + * Start pulling Player so he flies toward the hookshot's current location. + * Setting Player's parent pointer indicates that he should begin flying. + * See `Player_UpdateUpperBody` and `Player_Action_HookshotFly` for Player's side of the interation. + */ +void ArmsHook_PullPlayer(ArmsHook* this) { this->actor.child = this->actor.parent; this->actor.parent->parent = &this->actor; } @@ -154,12 +159,13 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { (this->collider.elem.atHitElem->elemMaterial != ELEM_MATERIAL_UNK4)) { Actor* touchedActor = this->collider.base.at; - if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) { + if ((touchedActor->update != NULL) && + (touchedActor->flags & (ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER))) { if (this->collider.elem.atHitElem->acElemFlags & ACELEM_HOOKABLE) { ArmsHook_AttachToActor(this, touchedActor); - if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) { - func_80865044(this); + if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)) { + ArmsHook_PullPlayer(this); } } } @@ -230,6 +236,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { newPos.z = bodyDistDiffVec.z * velocity; if (this->actor.child == NULL) { + // Not pulling Player if ((attachedActor != NULL) && (attachedActor->id == ACTOR_BG_SPOT06_OBJECTS)) { Math_Vec3f_Diff(&attachedActor->world.pos, &this->attachPointOffset, &this->actor.world.pos); phi_f16 = 1.0f; @@ -240,6 +247,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { } } } else { + // Pulling Player Math_Vec3f_Diff(&bodyDistDiffVec, &newPos, &player->actor.velocity); player->actor.world.rot.x = Math_Atan2S(sqrtf(SQ(bodyDistDiffVec.x) + SQ(bodyDistDiffVec.z)), -bodyDistDiffVec.y); @@ -290,7 +298,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { ArmsHook_AttachToActor(this, &dynaPolyActor->actor); } } - func_80865044(this); + ArmsHook_PullPlayer(this); Audio_PlaySfxGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 75618fb746..459667c5a9 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -7,7 +7,7 @@ #include "z_bg_spot06_objects.h" #include "assets/objects/object_spot06_objects/object_spot06_objects.h" -#define FLAGS ACTOR_FLAG_9 +#define FLAGS ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR typedef enum LakeHyliaObjectsType { /* 0x0 */ LHO_WATER_TEMPLE_ENTRACE_GATE, diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index f3f47695c6..d28e4e031d 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -524,7 +524,7 @@ void BossFd2_Vulnerable(BossFd2* this, PlayState* play) { s16 i; this->disableAT = true; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; SkelAnime_Update(&this->skelAnime); switch (this->work[FD2_ACTION_STATE]) { case 0: @@ -960,7 +960,7 @@ void BossFd2_Update(Actor* thisx, PlayState* play2) { PRINTF("FD2 move start \n"); this->disableAT = false; - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; this->work[FD2_VAR_TIMER]++; this->work[FD2_UNK_TIMER]++; diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index a03d2f55d5..68bfe14550 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -2580,7 +2580,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) { this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLandAnim); Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfLandAnim, 0.0f); this->timers[0] = 70; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; } break; @@ -2613,7 +2613,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) { this->unk_2E6 = 80; this->unk_2E8 = 0; - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; } break; diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 7a8f1a7bf6..4a8842ce8e 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -748,7 +748,7 @@ void BossGanondrof_Stunned(BossGanondrof* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_DAMAGE2); } - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; } PRINTF("TIME0 %d ********************************************\n", this->timers[0]); @@ -1297,7 +1297,7 @@ void BossGanondrof_Update(Actor* thisx, PlayState* play) { BossGanondrof* this = (BossGanondrof*)thisx; PRINTF("MOVE START %d\n", this->actor.params); - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; this->colliderBody.base.colMaterial = COL_MATERIAL_HIT3; if (this->killActor) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index c634a6ecc2..df146be4a2 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -2232,7 +2232,7 @@ void BossMo_UpdateCore(Actor* thisx, PlayState* play) { } else { MO_WATER_LEVEL(play) = sMorphaTent2->waterLevelMod + ((s16)this->waterLevel + sMorphaTent1->waterLevelMod); } - this->actor.flags |= ACTOR_FLAG_9; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR; this->actor.focus.pos = this->actor.world.pos; this->work[MO_TENT_VAR_TIMER]++; diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 7f4a23e375..95d7609c70 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -14,7 +14,8 @@ #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ "pal-1.0:128 pal-1.1:128" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10) +#define FLAGS \ + (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) #define vParity actionVar #define vVanish actionVar diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index c89dadb7c0..61cac2ec1d 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -2974,7 +2974,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) { BossTw* this = (BossTw*)thisx; Player* player = GET_PLAYER(play); - this->actor.flags &= ~ACTOR_FLAG_10; + this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; this->unk_5F8 = 0; this->collider.base.colMaterial = COL_MATERIAL_HIT3; @@ -5252,7 +5252,7 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) { s16 cloudType; this->unk_5F8 = 1; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; cloudType = sTwinrovaBlastType == 0 ? TWEFF_3 : TWEFF_2; diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 0936c81d77..4d0e0c269d 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -1,7 +1,7 @@ #include "z_en_dh.h" #include "assets/objects/object_dh/object_dh.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) typedef enum EnDhAction { /* 0 */ DH_WAIT, diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 4f1bb687a1..2de4d16ae0 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -9,7 +9,7 @@ #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_fw/object_fw.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) void EnFd_Init(Actor* thisx, PlayState* play); void EnFd_Destroy(Actor* thisx, PlayState* play); 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 bc241f43df..e08b501210 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -7,7 +7,7 @@ #include "z_en_floormas.h" #include "assets/objects/object_wallmaster/object_wallmaster.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) #define SPAWN_INVISIBLE 0x8000 #define SPAWN_SMALL 0x10 diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index c8e36e1add..c6d3387194 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) void EnFw_Init(Actor* thisx, PlayState* play); void EnFw_Destroy(Actor* thisx, PlayState* play); 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 c7b14455b3..d22dbe06c2 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -1,7 +1,7 @@ #include "z_en_fz.h" #include "assets/objects/object_fz/object_fz.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) void EnFz_Init(Actor* thisx, PlayState* play); void EnFz_Destroy(Actor* thisx, PlayState* play); 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 69644f547f..223b2a515c 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -202,7 +202,7 @@ void EnIk_InitImpl(Actor* thisx, PlayState* play) { thisx->update = EnIk_UpdateEnemy; thisx->draw = EnIk_DrawEnemy; - thisx->flags |= ACTOR_FLAG_10; + thisx->flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; Collider_InitCylinder(play, &this->bodyCollider); Collider_SetCylinder(play, &this->bodyCollider, thisx, &sCylinderInit); diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index eae5c35a2c..d5ada18305 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -73,7 +73,7 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->skelanime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); this->rot = this->actor.world.rot; - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); diff --git a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c index f7ff903748..f621913306 100644 --- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c +++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c @@ -91,7 +91,7 @@ void EnKakasi2_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->height = 60.0f; Actor_SetScale(&this->actor, 0.01f); - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; this->unk_198 = this->actor.shape.rot.y; if (this->switchFlag >= 0 && Flags_GetSwitch(play, this->switchFlag)) { diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index e71d045750..c670a19efb 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -76,7 +76,7 @@ void EnKakasi3_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); SkelAnime_InitFlex(play, &this->skelAnime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); - this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; this->rot = this->actor.world.rot; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); 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 c9e1bca7c6..71ab72ebb4 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 @@ -8,9 +8,9 @@ #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_po_sisters/object_po_sisters.h" -#define FLAGS \ - (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_9 | ACTOR_FLAG_IGNORE_QUAKE | \ - ACTOR_FLAG_CAN_ATTACH_TO_ARROW) +#define FLAGS \ + (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | \ + ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW) void EnPoSisters_Init(Actor* thisx, PlayState* play); void EnPoSisters_Destroy(Actor* thisx, PlayState* play); @@ -210,7 +210,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; func_80AD9AA8(this, play); } else { - this->actor.flags &= ~(ACTOR_FLAG_9 | ACTOR_FLAG_CAN_ATTACH_TO_ARROW); + this->actor.flags &= ~(ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_CAN_ATTACH_TO_ARROW); this->collider.elem.elemMaterial = ELEM_MATERIAL_UNK4; this->collider.elem.acDmgInfo.dmgFlags |= DMG_DEKU_NUT; this->collider.base.ocFlags1 = OC1_NONE; 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 dfb43d8860..89c9e5ff6b 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -1,7 +1,7 @@ #include "z_en_rd.h" #include "assets/objects/object_rd/object_rd.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) void EnRd_Init(Actor* thisx, PlayState* play); void EnRd_Destroy(Actor* thisx, PlayState* play); 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 11918fd361..0708af32ef 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -9,7 +9,8 @@ #include "terminal.h" #include "versions.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10) +#define FLAGS \ + (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) #define RR_MESSAGE_SHIELD (1 << 0) #define RR_MESSAGE_TUNIC (1 << 1) diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index 80b265fbc7..fad66480db 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -6,7 +6,7 @@ #include "z_en_si.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) void EnSi_Init(Actor* thisx, PlayState* play); void EnSi_Destroy(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index 14da6adb97..0804263355 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -7,7 +7,7 @@ #include "z_en_skjneedle.h" #include "assets/objects/object_skj/object_skj.h" -#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_9) +#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) void EnSkjneedle_Init(Actor* thisx, PlayState* play); void EnSkjneedle_Destroy(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index c6ff95c34c..d68f3d3c46 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -9,7 +9,7 @@ #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_syokudai/object_syokudai.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_10) +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER) void ObjSyokudai_Init(Actor* thisx, PlayState* play); void ObjSyokudai_Destroy(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 9d84bf3ab4..13ad79e644 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -324,7 +324,7 @@ void Player_Action_808505DC(Player* this, PlayState* play); void Player_Action_8085063C(Player* this, PlayState* play); void Player_Action_8085076C(Player* this, PlayState* play); void Player_Action_808507F4(Player* this, PlayState* play); -void Player_Action_80850AEC(Player* this, PlayState* play); +void Player_Action_HookshotFly(Player* this, PlayState* play); void Player_Action_80850C68(Player* this, PlayState* play); void Player_Action_80850E84(Player* this, PlayState* play); void Player_Action_CsAction(Player* this, PlayState* play); @@ -3659,7 +3659,7 @@ int Player_CanUpdateItems(Player* this) { */ s32 Player_UpdateUpperBody(Player* this, PlayState* play) { if (!(this->stateFlags1 & PLAYER_STATE1_23) && (this->actor.parent != NULL) && Player_HoldsHookshot(this)) { - Player_SetupAction(play, this, Player_Action_80850AEC, 1); + Player_SetupAction(play, this, Player_Action_HookshotFly, 1); this->stateFlags3 |= PLAYER_STATE3_FLYING_WITH_HOOKSHOT; Player_AnimPlayOnce(play, this, &gPlayerAnim_link_hook_fly_start); Player_StartAnimMovement(play, this, @@ -14832,7 +14832,7 @@ void Player_Action_808507F4(Player* this, PlayState* play) { Player_DecelerateToZero(this); } -void Player_Action_80850AEC(Player* this, PlayState* play) { +void Player_Action_HookshotFly(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_5; if (LinkAnimation_Update(play, &this->skelAnime)) {