1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-16 13:36:57 +00:00

istargeted -> islockedon (#2132)

This commit is contained in:
fig02 2024-09-04 19:26:23 -04:00 committed by GitHub
parent dc469461a9
commit 6051251c92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 78 additions and 78 deletions

View file

@ -447,8 +447,8 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius);
void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory); void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
void Actor_SetTextWithPrefix(PlayState* play, Actor* actor, s16 baseTextId); void Actor_SetTextWithPrefix(PlayState* play, Actor* actor, s16 baseTextId);
s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16 angle); s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16 angle);
s32 Actor_IsTargeted(PlayState* play, Actor* actor); s32 Actor_IsLockedOn(PlayState* play, Actor* actor);
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor); s32 Actor_OtherIsLockedOn(PlayState* play, Actor* actor);
f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play); void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play);
void Actor_RequestQuake(PlayState* play, s16 y, s16 duration); void Actor_RequestQuake(PlayState* play, s16 y, s16 duration);

View file

@ -287,7 +287,7 @@ typedef struct Actor {
/* 0x0F8 */ f32 uncullZoneScale; // Amount to increase the uncull zone scale by (in projected space) /* 0x0F8 */ f32 uncullZoneScale; // Amount to increase the uncull zone scale by (in projected space)
/* 0x0FC */ f32 uncullZoneDownward; // Amount to increase uncull zone downward by (in projected space) /* 0x0FC */ f32 uncullZoneDownward; // Amount to increase uncull zone downward by (in projected space)
/* 0x100 */ Vec3f prevPos; // World position from the previous update cycle /* 0x100 */ Vec3f prevPos; // World position from the previous update cycle
/* 0x10C */ u8 isTargeted; // Set to true if the actor is currently being targeted by the player /* 0x10C */ u8 isLockedOn; // Set to true if the actor is currently locked-on by Player
/* 0x10D */ u8 targetPriority; // Lower values have higher priority. Resets to 0 when player stops targeting /* 0x10D */ u8 targetPriority; // Lower values have higher priority. Resets to 0 when player stops targeting
/* 0x10E */ u16 textId; // Text ID to pass to player/display when interacting with the actor /* 0x10E */ u16 textId; // Text ID to pass to player/display when interacting with the actor
/* 0x110 */ u16 freezeTimer; // Actor does not update when set. Timer decrements automatically /* 0x110 */ u16 freezeTimer; // Actor does not update when set. Timer decrements automatically

View file

@ -1680,7 +1680,7 @@ s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 xzRange, f32 yRan
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((player->actor.flags & ACTOR_FLAG_TALK) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || if ((player->actor.flags & ACTOR_FLAG_TALK) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) ||
(!actor->isTargeted && (!actor->isLockedOn &&
((yRange < fabsf(actor->yDistToPlayer)) || (player->talkActorDistance < actor->xzDistToPlayer) || ((yRange < fabsf(actor->yDistToPlayer)) || (player->talkActorDistance < actor->xzDistToPlayer) ||
(xzRange < actor->xzDistToPlayer)))) { (xzRange < actor->xzDistToPlayer)))) {
return false; return false;
@ -2334,9 +2334,9 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) { if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) {
if (actor == player->focusActor) { if (actor == player->focusActor) {
actor->isTargeted = true; actor->isLockedOn = true;
} else { } else {
actor->isTargeted = false; actor->isLockedOn = false;
} }
if ((actor->targetPriority != 0) && (player->focusActor == NULL)) { if ((actor->targetPriority != 0) && (player->focusActor == NULL)) {
@ -3745,12 +3745,12 @@ s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16
} }
/** /**
* Returns true if the player is targeting the provided actor * Returns true if the player is locked onto the specified actor
*/ */
s32 Actor_IsTargeted(PlayState* play, Actor* actor) { s32 Actor_IsLockedOn(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_4) && actor->isTargeted) { if ((player->stateFlags1 & PLAYER_STATE1_4) && actor->isLockedOn) {
return true; return true;
} else { } else {
return false; return false;
@ -3758,12 +3758,12 @@ s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
} }
/** /**
* Returns true if the player is targeting an actor other than the provided actor * Returns true if the player is locked onto an actor other than the specified actor
*/ */
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) { s32 Actor_OtherIsLockedOn(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_4) && !actor->isTargeted) { if ((player->stateFlags1 & PLAYER_STATE1_4) && !actor->isLockedOn) {
return true; return true;
} else { } else {
return false; return false;
@ -5904,7 +5904,7 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
return false; return false;
} }
if ((actor->xyzDistToPlayerSq > SQ(160.0f)) && !actor->isTargeted) { if ((actor->xyzDistToPlayerSq > SQ(160.0f)) && !actor->isLockedOn) {
return false; return false;
} }

View file

@ -143,7 +143,7 @@ void func_808BC8B8(BgTreemouth* this, PlayState* play) {
if (Flags_GetEventChkInf(EVENTCHKINF_0C)) { if (Flags_GetEventChkInf(EVENTCHKINF_0C)) {
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) { if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
this->dyna.actor.flags |= ACTOR_FLAG_0; this->dyna.actor.flags |= ACTOR_FLAG_0;
if (this->dyna.actor.isTargeted) { if (this->dyna.actor.isLockedOn) {
this->dyna.actor.flags &= ~ACTOR_FLAG_0; this->dyna.actor.flags &= ~ACTOR_FLAG_0;
play->csCtx.script = D_808BD2A0; play->csCtx.script = D_808BD2A0;
gSaveContext.cutsceneTrigger = 1; gSaveContext.cutsceneTrigger = 1;

View file

@ -346,7 +346,7 @@ void EnDns_Idle(EnDns* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->actor, play)) { if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->actionFunc = EnDns_Talk; this->actionFunc = EnDns_Talk;
} else { } else {
if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isLockedOn) {
this->actor.flags |= ACTOR_FLAG_16; this->actor.flags |= ACTOR_FLAG_16;
} else { } else {
this->actor.flags &= ~ACTOR_FLAG_16; this->actor.flags &= ~ACTOR_FLAG_16;

View file

@ -334,7 +334,7 @@ s32 EnGeldB_ReactToPlayer(PlayState* play, EnGeldB* this, s16 arg2) {
} else { } else {
s16 angleToFacingLink = player->actor.shape.rot.y - thisx->shape.rot.y; s16 angleToFacingLink = player->actor.shape.rot.y - thisx->shape.rot.y;
if ((thisx->xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(play, thisx) && if ((thisx->xzDistToPlayer <= 45.0f) && !Actor_OtherIsLockedOn(play, thisx) &&
((play->gameplayFrames & 7) || (ABS(angleToFacingLink) < 0x38E0))) { ((play->gameplayFrames & 7) || (ABS(angleToFacingLink) < 0x38E0))) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
return true; return true;
@ -456,7 +456,7 @@ void EnGeldB_Ready(EnGeldB* this, PlayState* play) {
if (Actor_IsFacingPlayer(&this->actor, 30 * 0x10000 / 360)) { if (Actor_IsFacingPlayer(&this->actor, 30 * 0x10000 / 360)) {
if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) && if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) &&
(Rand_ZeroOne() < 0.3f)) { (Rand_ZeroOne() < 0.3f)) {
if (Actor_OtherIsTargeted(play, &this->actor) || (Rand_ZeroOne() > 0.5f) || if (Actor_OtherIsLockedOn(play, &this->actor) || (Rand_ZeroOne() > 0.5f) ||
(ABS(angleToLink) < 0x38E0)) { (ABS(angleToLink) < 0x38E0)) {
EnGeldB_SetupRollForward(this); EnGeldB_SetupRollForward(this);
} else { } else {
@ -525,10 +525,10 @@ void EnGeldB_Advance(EnGeldB* this, PlayState* play) {
EnGeldB_SetupReady(this); EnGeldB_SetupReady(this);
} }
} else if (this->actor.xzDistToPlayer < 90.0f) { } else if (this->actor.xzDistToPlayer < 90.0f) {
if (!Actor_OtherIsTargeted(play, &this->actor) && if (!Actor_OtherIsLockedOn(play, &this->actor) &&
(Rand_ZeroOne() > 0.03f || (this->actor.xzDistToPlayer <= 45.0f && facingAngletoLink < 0x38E0))) { (Rand_ZeroOne() > 0.03f || (this->actor.xzDistToPlayer <= 45.0f && facingAngletoLink < 0x38E0))) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else if (Actor_OtherIsTargeted(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) { } else if (Actor_OtherIsLockedOn(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
EnGeldB_SetupRollBack(this); EnGeldB_SetupRollBack(this);
} else { } else {
EnGeldB_SetupCircle(this); EnGeldB_SetupCircle(this);
@ -537,7 +537,7 @@ void EnGeldB_Advance(EnGeldB* this, PlayState* play) {
if (!EnGeldB_ReactToPlayer(play, this, 0)) { if (!EnGeldB_ReactToPlayer(play, this, 0)) {
if ((this->actor.xzDistToPlayer < 210.0f) && (this->actor.xzDistToPlayer > 150.0f) && if ((this->actor.xzDistToPlayer < 210.0f) && (this->actor.xzDistToPlayer > 150.0f) &&
Actor_IsFacingPlayer(&this->actor, 0x71C)) { Actor_IsFacingPlayer(&this->actor, 0x71C)) {
if (Actor_IsTargeted(play, &this->actor)) { if (Actor_IsLockedOn(play, &this->actor)) {
if (Rand_ZeroOne() > 0.5f) { if (Rand_ZeroOne() > 0.5f) {
EnGeldB_SetupRollForward(this); EnGeldB_SetupRollForward(this);
} else { } else {
@ -588,7 +588,7 @@ void EnGeldB_RollForward(EnGeldB* this, PlayState* play) {
if (ABS(facingAngleToLink) < 0x38E0) { if (ABS(facingAngleToLink) < 0x38E0) {
this->lookTimer = 20; this->lookTimer = 20;
} }
} else if (!Actor_OtherIsTargeted(play, &this->actor) && } else if (!Actor_OtherIsLockedOn(play, &this->actor) &&
(Rand_ZeroOne() > 0.5f || (ABS(facingAngleToLink) < 0x3FFC))) { (Rand_ZeroOne() > 0.5f || (ABS(facingAngleToLink) < 0x3FFC))) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else { } else {
@ -728,10 +728,10 @@ void EnGeldB_Circle(EnGeldB* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GERUDOFT_BREATH); Actor_PlaySfx(&this->actor, NA_SE_EN_GERUDOFT_BREATH);
} }
if ((Math_CosS(angleBehindLink - this->actor.shape.rot.y) < -0.85f) && if ((Math_CosS(angleBehindLink - this->actor.shape.rot.y) < -0.85f) &&
!Actor_OtherIsTargeted(play, &this->actor) && (this->actor.xzDistToPlayer <= 45.0f)) { !Actor_OtherIsLockedOn(play, &this->actor) && (this->actor.xzDistToPlayer <= 45.0f)) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else if (--this->timer == 0) { } else if (--this->timer == 0) {
if (Actor_OtherIsTargeted(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) { if (Actor_OtherIsLockedOn(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
EnGeldB_SetupRollBack(this); EnGeldB_SetupRollBack(this);
} else { } else {
EnGeldB_SetupReady(this); EnGeldB_SetupReady(this);
@ -827,7 +827,7 @@ void EnGeldB_SpinDodge(EnGeldB* this, PlayState* play) {
if (this->timer == 0) { if (this->timer == 0) {
this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
if (!EnGeldB_DodgeRanged(play, this)) { if (!EnGeldB_DodgeRanged(play, this)) {
if (!Actor_OtherIsTargeted(play, &this->actor) && (this->actor.xzDistToPlayer <= 70.0f)) { if (!Actor_OtherIsLockedOn(play, &this->actor) && (this->actor.xzDistToPlayer <= 70.0f)) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else { } else {
EnGeldB_SetupRollBack(this); EnGeldB_SetupRollBack(this);
@ -994,7 +994,7 @@ void EnGeldB_SetupRollBack(EnGeldB* this) {
void EnGeldB_RollBack(EnGeldB* this, PlayState* play) { void EnGeldB_RollBack(EnGeldB* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) { if (SkelAnime_Update(&this->skelAnime)) {
if (!Actor_OtherIsTargeted(play, &this->actor) && (this->actor.xzDistToPlayer < 170.0f) && if (!Actor_OtherIsLockedOn(play, &this->actor) && (this->actor.xzDistToPlayer < 170.0f) &&
(this->actor.xzDistToPlayer > 140.0f) && (Rand_ZeroOne() < 0.2f)) { (this->actor.xzDistToPlayer > 140.0f) && (Rand_ZeroOne() < 0.2f)) {
EnGeldB_SetupSpinAttack(this); EnGeldB_SetupSpinAttack(this);
} else if (play->gameplayFrames & 1) { } else if (play->gameplayFrames & 1) {
@ -1077,7 +1077,7 @@ void EnGeldB_Damaged(EnGeldB* this, PlayState* play) {
(this->actor.xzDistToPlayer < 90.0f)) { (this->actor.xzDistToPlayer < 90.0f)) {
EnGeldB_SetupJump(this); EnGeldB_SetupJump(this);
} else if (!EnGeldB_DodgeRanged(play, this)) { } else if (!EnGeldB_DodgeRanged(play, this)) {
if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(play, &this->actor) && if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsLockedOn(play, &this->actor) &&
(play->gameplayFrames & 7)) { (play->gameplayFrames & 7)) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else { } else {
@ -1114,7 +1114,7 @@ void EnGeldB_Jump(EnGeldB* this, PlayState* play) {
this->actor.speed = 0.0f; this->actor.speed = 0.0f;
this->actor.velocity.y = 0.0f; this->actor.velocity.y = 0.0f;
this->actor.world.pos.y = this->actor.floorHeight; this->actor.world.pos.y = this->actor.floorHeight;
if (!Actor_OtherIsTargeted(play, &this->actor)) { if (!Actor_OtherIsLockedOn(play, &this->actor)) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else { } else {
EnGeldB_SetupReady(this); EnGeldB_SetupReady(this);
@ -1160,7 +1160,7 @@ void EnGeldB_Block(EnGeldB* this, PlayState* play) {
} }
} else { } else {
angleFacingLink = player->actor.shape.rot.y - this->actor.shape.rot.y; angleFacingLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
if (!Actor_OtherIsTargeted(play, &this->actor) && if (!Actor_OtherIsLockedOn(play, &this->actor) &&
((play->gameplayFrames & 1) || (ABS(angleFacingLink) < 0x38E0))) { ((play->gameplayFrames & 1) || (ABS(angleFacingLink) < 0x38E0))) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else { } else {
@ -1291,12 +1291,12 @@ void EnGeldB_Sidestep(EnGeldB* this, PlayState* play) {
s16 angleFacingPlayer2 = player2->actor.shape.rot.y - this->actor.shape.rot.y; s16 angleFacingPlayer2 = player2->actor.shape.rot.y - this->actor.shape.rot.y;
this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.world.rot.y = this->actor.shape.rot.y;
if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(play, &this->actor) && if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsLockedOn(play, &this->actor) &&
(!(play->gameplayFrames & 3) || (ABS(angleFacingPlayer2) < 0x38E0))) { (!(play->gameplayFrames & 3) || (ABS(angleFacingPlayer2) < 0x38E0))) {
EnGeldB_SetupSlash(this); EnGeldB_SetupSlash(this);
} else if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) && } else if ((210.0f > this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 150.0f) &&
!(play->gameplayFrames & 1)) { !(play->gameplayFrames & 1)) {
if (Actor_OtherIsTargeted(play, &this->actor) || (Rand_ZeroOne() > 0.5f) || if (Actor_OtherIsLockedOn(play, &this->actor) || (Rand_ZeroOne() > 0.5f) ||
(ABS(angleFacingPlayer2) < 0x38E0)) { (ABS(angleFacingPlayer2) < 0x38E0)) {
EnGeldB_SetupRollForward(this); EnGeldB_SetupRollForward(this);
} else { } else {

View file

@ -323,7 +323,7 @@ void EnHintnuts_BeginFreeze(EnHintnuts* this, PlayState* play) {
void EnHintnuts_CheckProximity(EnHintnuts* this, PlayState* play) { void EnHintnuts_CheckProximity(EnHintnuts* this, PlayState* play) {
if (this->actor.category != ACTORCAT_ENEMY) { if (this->actor.category != ACTORCAT_ENEMY) {
if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isLockedOn) {
this->actor.flags |= ACTOR_FLAG_16; this->actor.flags |= ACTOR_FLAG_16;
} else { } else {
this->actor.flags &= ~ACTOR_FLAG_16; this->actor.flags &= ~ACTOR_FLAG_16;

View file

@ -1250,7 +1250,7 @@ void func_80A995CC(EnKo* this, PlayState* play) {
this->actor.world.pos.z += 80.0f * Math_CosS(homeYawToPlayer); this->actor.world.pos.z += 80.0f * Math_CosS(homeYawToPlayer);
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE || !this->actor.isTargeted) { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE || !this->actor.isLockedOn) {
temp_f2 = fabsf((f32)this->actor.yawTowardsPlayer - homeYawToPlayer) * 0.001f * 3.0f; temp_f2 = fabsf((f32)this->actor.yawTowardsPlayer - homeYawToPlayer) * 0.001f * 3.0f;
if (temp_f2 < 1.0f) { if (temp_f2 < 1.0f) {
this->skelAnime.playSpeed = 1.0f; this->skelAnime.playSpeed = 1.0f;

View file

@ -1108,7 +1108,7 @@ void func_80ADBF58(EnPoSisters* this, PlayState* play) {
} }
void func_80ADC034(EnPoSisters* this, PlayState* play) { void func_80ADC034(EnPoSisters* this, PlayState* play) {
if (this->actor.isTargeted && this->unk_22E.a == 255) { if (this->actor.isLockedOn && this->unk_22E.a == 255) {
if (this->unk_197 != 0) { if (this->unk_197 != 0) {
this->unk_197--; this->unk_197--;
} }

View file

@ -883,7 +883,7 @@ void EnPoh_UpdateVisibility(EnPoh* this) {
this->visibilityTimer--; this->visibilityTimer--;
} }
if (this->lightColor.a == 255) { if (this->lightColor.a == 255) {
if (this->actor.isTargeted) { if (this->actor.isLockedOn) {
this->unk_194++; this->unk_194++;
this->unk_194 = CLAMP_MAX(this->unk_194, 20); this->unk_194 = CLAMP_MAX(this->unk_194, 20);
} else { } else {

View file

@ -335,7 +335,7 @@ void EnTest_ChooseRandomAction(EnTest* this, PlayState* play) {
case 5: case 5:
case 6: case 6:
if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 170.0f) && if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 170.0f) &&
Actor_IsFacingPlayer(&this->actor, 0x71C) && Actor_IsTargeted(play, &this->actor)) { Actor_IsFacingPlayer(&this->actor, 0x71C) && Actor_IsLockedOn(play, &this->actor)) {
EnTest_SetupJumpslash(this); EnTest_SetupJumpslash(this);
break; break;
} }
@ -395,7 +395,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer;
EnTest_SetupJumpBack(this); EnTest_SetupJumpBack(this);
} else if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 170.0f)) { } else if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 170.0f)) {
if (Actor_IsFacingPlayer(&this->actor, 0x71C) && !Actor_IsTargeted(play, &this->actor)) { if (Actor_IsFacingPlayer(&this->actor, 0x71C) && !Actor_IsLockedOn(play, &this->actor)) {
EnTest_SetupJumpslash(this); EnTest_SetupJumpslash(this);
} }
} else { } else {
@ -405,7 +405,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 110.0f) { if (this->actor.xzDistToPlayer < 110.0f) {
if (Rand_ZeroOne() > 0.2f) { if (Rand_ZeroOne() > 0.2f) {
if (player->stateFlags1 & PLAYER_STATE1_4) { if (player->stateFlags1 & PLAYER_STATE1_4) {
if (this->actor.isTargeted) { if (this->actor.isLockedOn) {
EnTest_SetupSlashDown(this); EnTest_SetupSlashDown(this);
} else { } else {
func_808627C4(this, play); func_808627C4(this, play);
@ -512,7 +512,7 @@ void EnTest_Idle(EnTest* this, PlayState* play) {
if (Actor_IsFacingPlayer(&this->actor, 0x1555)) { if (Actor_IsFacingPlayer(&this->actor, 0x1555)) {
if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 160.0f) && if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 160.0f) &&
(Rand_ZeroOne() < 0.3f)) { (Rand_ZeroOne() < 0.3f)) {
if (Actor_IsTargeted(play, &this->actor)) { if (Actor_IsLockedOn(play, &this->actor)) {
EnTest_SetupJumpslash(this); EnTest_SetupJumpslash(this);
} else { } else {
func_808627C4(this, play); func_808627C4(this, play);
@ -578,7 +578,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
if (!EnTest_ReactToProjectile(play, this)) { if (!EnTest_ReactToProjectile(play, this)) {
this->timer++; this->timer++;
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
checkDist = 150.0f; checkDist = 150.0f;
} }
@ -659,13 +659,13 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 160.0f) && if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 160.0f) &&
(Actor_IsFacingPlayer(&this->actor, 0x71C))) { (Actor_IsFacingPlayer(&this->actor, 0x71C))) {
if (Actor_IsTargeted(play, &this->actor)) { if (Actor_IsLockedOn(play, &this->actor)) {
if (Rand_ZeroOne() < 0.1f) { if (Rand_ZeroOne() < 0.1f) {
EnTest_SetupJumpslash(this); EnTest_SetupJumpslash(this);
return; return;
} }
} else if (player->heldItemAction != PLAYER_IA_NONE) { } else if (player->heldItemAction != PLAYER_IA_NONE) {
if (this->actor.isTargeted) { if (this->actor.isLockedOn) {
if ((play->gameplayFrames % 2) != 0) { if ((play->gameplayFrames % 2) != 0) {
func_808627C4(this, play); func_808627C4(this, play);
return; return;
@ -691,7 +691,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 110.0f) { if (this->actor.xzDistToPlayer < 110.0f) {
if (Rand_ZeroOne() > 0.2f) { if (Rand_ZeroOne() > 0.2f) {
if (player->stateFlags1 & PLAYER_STATE1_4) { if (player->stateFlags1 & PLAYER_STATE1_4) {
if (this->actor.isTargeted) { if (this->actor.isLockedOn) {
EnTest_SetupSlashDown(this); EnTest_SetupSlashDown(this);
} else { } else {
func_808627C4(this, play); func_808627C4(this, play);
@ -845,7 +845,7 @@ void func_80860F84(EnTest* this, PlayState* play) {
} }
} }
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
checkDist = 200.0f; checkDist = 200.0f;
} }
@ -976,7 +976,7 @@ void EnTest_SlashDownEnd(EnTest* this, PlayState* play) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer;
EnTest_SetupJumpBack(this); EnTest_SetupJumpBack(this);
} else if (player->stateFlags1 & PLAYER_STATE1_4) { } else if (player->stateFlags1 & PLAYER_STATE1_4) {
if (this->actor.isTargeted) { if (this->actor.isLockedOn) {
EnTest_SetupSlashDown(this); EnTest_SetupSlashDown(this);
} else if ((play->gameplayFrames % 2) != 0) { } else if ((play->gameplayFrames % 2) != 0) {
func_808627C4(this, play); func_808627C4(this, play);
@ -1345,7 +1345,7 @@ void EnTest_Stunned(EnTest* this, PlayState* play) {
// a variation of sidestep // a variation of sidestep
void func_808627C4(EnTest* this, PlayState* play) { void func_808627C4(EnTest* this, PlayState* play) {
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
func_80860EC0(this); func_80860EC0(this);
return; return;
} }
@ -1421,7 +1421,7 @@ void func_808628C8(EnTest* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y + 0x3FFF; this->actor.world.rot.y = this->actor.shape.rot.y + 0x3FFF;
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
checkDist = 200.0f; checkDist = 200.0f;
} }
@ -1457,9 +1457,9 @@ void func_808628C8(EnTest* this, PlayState* play) {
} }
if (this->timer == 0) { if (this->timer == 0) {
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
EnTest_SetupIdle(this); EnTest_SetupIdle(this);
} else if (Actor_IsTargeted(play, &this->actor)) { } else if (Actor_IsLockedOn(play, &this->actor)) {
if (!EnTest_ReactToProjectile(play, this)) { if (!EnTest_ReactToProjectile(play, this)) {
EnTest_ChooseAction(this, play); EnTest_ChooseAction(this, play);
} }
@ -2007,7 +2007,7 @@ s32 EnTest_ReactToProjectile(PlayState* play, EnTest* this) {
} }
if (Math_Vec3f_DistXYZ(&this->actor.world.pos, &projectileActor->world.pos) < 200.0f) { if (Math_Vec3f_DistXYZ(&this->actor.world.pos, &projectileActor->world.pos) < 200.0f) {
if (Actor_IsTargeted(play, &this->actor) && (projectileActor->id == ACTOR_ARMS_HOOK)) { if (Actor_IsLockedOn(play, &this->actor) && (projectileActor->id == ACTOR_ARMS_HOOK)) {
EnTest_SetupJumpUp(this); EnTest_SetupJumpUp(this);
} else if (ABS(yawToProjectile) < 0x2000) { } else if (ABS(yawToProjectile) < 0x2000) {
EnTest_SetupStopAndBlock(this); EnTest_SetupStopAndBlock(this);
@ -2020,7 +2020,7 @@ s32 EnTest_ReactToProjectile(PlayState* play, EnTest* this) {
return true; return true;
} }
if (Actor_IsTargeted(play, &this->actor) && (projectileActor->id == ACTOR_ARMS_HOOK)) { if (Actor_IsLockedOn(play, &this->actor) && (projectileActor->id == ACTOR_ARMS_HOOK)) {
EnTest_SetupJumpUp(this); EnTest_SetupJumpUp(this);
return true; return true;
} }

View file

@ -218,7 +218,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
this->skelAnime.playSpeed = 0.0f; this->skelAnime.playSpeed = 0.0f;
this->actor.world.pos.x = (Math_SinS(this->actor.world.rot.y) * 25.0f) + sSpawnPoint.x; this->actor.world.pos.x = (Math_SinS(this->actor.world.rot.y) * 25.0f) + sSpawnPoint.x;
this->actor.world.pos.z = (Math_CosS(this->actor.world.rot.y) * 25.0f) + sSpawnPoint.z; this->actor.world.pos.z = (Math_CosS(this->actor.world.rot.y) * 25.0f) + sSpawnPoint.z;
if ((this->actor.xzDistToPlayer <= 120.0f) || Actor_IsTargeted(play, &this->actor) || if ((this->actor.xzDistToPlayer <= 120.0f) || Actor_IsLockedOn(play, &this->actor) ||
(attackItem != NULL)) { (attackItem != NULL)) {
if (attackItem != NULL) { if (attackItem != NULL) {
sDodgeRollState = 1; sDodgeRollState = 1;
@ -355,7 +355,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
if ((this->meleeWeaponState == 0) && (sCounterState == 0) && if ((this->meleeWeaponState == 0) && (sCounterState == 0) &&
(player->invincibilityTimer == 0) && (player->invincibilityTimer == 0) &&
(player->meleeWeaponAnimation == PLAYER_MWA_STAB_1H) && (player->meleeWeaponAnimation == PLAYER_MWA_STAB_1H) &&
(this->actor.xzDistToPlayer <= 85.0f) && Actor_IsTargeted(play, &this->actor)) { (this->actor.xzDistToPlayer <= 85.0f) && Actor_IsLockedOn(play, &this->actor)) {
sStickTilt = 0.0f; sStickTilt = 0.0f;
sSwordJumpState = 1; sSwordJumpState = 1;
@ -407,7 +407,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
sStickAngle = thisx->yawTowardsPlayer; sStickAngle = thisx->yawTowardsPlayer;
if ((90.0f >= this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 70.0f) && if ((90.0f >= this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 70.0f) &&
(ABS(sp5A) >= 0x7800) && (ABS(sp5A) >= 0x7800) &&
(this->actor.isTargeted || !(player->stateFlags1 & PLAYER_STATE1_22))) { (this->actor.isLockedOn || !(player->stateFlags1 & PLAYER_STATE1_22))) {
EnTorch2_SwingSword(play, input, this); EnTorch2_SwingSword(play, input, this);
} else { } else {
f32 sp50 = 0.0f; f32 sp50 = 0.0f;
@ -422,7 +422,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
} else if (this->actor.xzDistToPlayer <= 50 + sp50) { } else if (this->actor.xzDistToPlayer <= 50 + sp50) {
sStickTilt = 127.0f; sStickTilt = 127.0f;
sStickAngle = this->actor.yawTowardsPlayer; sStickAngle = this->actor.yawTowardsPlayer;
if (!this->actor.isTargeted) { if (!this->actor.isLockedOn) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0); Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
} }
} else if (this->actor.xzDistToPlayer > 100.0f + sp50) { } else if (this->actor.xzDistToPlayer > 100.0f + sp50) {
@ -432,7 +432,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
(this->actor.xzDistToPlayer >= 280.0f)) { (this->actor.xzDistToPlayer >= 280.0f)) {
sStickTilt = 127.0f; sStickTilt = 127.0f;
sStickAngle = this->actor.yawTowardsPlayer; sStickAngle = this->actor.yawTowardsPlayer;
if (!this->actor.isTargeted) { if (!this->actor.isLockedOn) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328,
0); 0);
} }
@ -443,7 +443,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
!EnTorch2_SwingSword(play, input, this)) { !EnTorch2_SwingSword(play, input, this)) {
sStickAngle = this->actor.yawTowardsPlayer; sStickAngle = this->actor.yawTowardsPlayer;
sStickTilt = 127.0f; sStickTilt = 127.0f;
if (!this->actor.isTargeted) { if (!this->actor.isLockedOn) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0); Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
} }
} }

View file

@ -354,7 +354,7 @@ s32 EnWf_ChangeAction(PlayState* play, EnWf* this, s16 mustChoose) {
playerFacingAngleDiff = player->actor.shape.rot.y - this->actor.shape.rot.y; playerFacingAngleDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
if ((this->actor.xzDistToPlayer <= 80.0f) && !Actor_OtherIsTargeted(play, &this->actor) && if ((this->actor.xzDistToPlayer <= 80.0f) && !Actor_OtherIsLockedOn(play, &this->actor) &&
(((play->gameplayFrames % 8) != 0) || (ABS(playerFacingAngleDiff) < 0x38E0))) { (((play->gameplayFrames % 8) != 0) || (ABS(playerFacingAngleDiff) < 0x38E0))) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
return true; return true;
@ -502,7 +502,7 @@ void EnWf_RunAtPlayer(EnWf* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x2EE, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x2EE, 0);
this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.world.rot.y = this->actor.shape.rot.y;
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
baseRange = 150.0f; baseRange = 150.0f;
} }
@ -542,10 +542,10 @@ void EnWf_RunAtPlayer(EnWf* this, PlayState* play) {
} else if (this->actor.xzDistToPlayer < (90.0f + baseRange)) { } else if (this->actor.xzDistToPlayer < (90.0f + baseRange)) {
s16 temp_v1 = player->actor.shape.rot.y - this->actor.shape.rot.y; s16 temp_v1 = player->actor.shape.rot.y - this->actor.shape.rot.y;
if (!Actor_OtherIsTargeted(play, &this->actor) && if (!Actor_OtherIsLockedOn(play, &this->actor) &&
((Rand_ZeroOne() > 0.03f) || ((this->actor.xzDistToPlayer <= 80.0f) && (ABS(temp_v1) < 0x38E0)))) { ((Rand_ZeroOne() > 0.03f) || ((this->actor.xzDistToPlayer <= 80.0f) && (ABS(temp_v1) < 0x38E0)))) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
} else if (Actor_OtherIsTargeted(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) { } else if (Actor_OtherIsLockedOn(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
EnWf_SetupBackflipAway(this); EnWf_SetupBackflipAway(this);
} else { } else {
EnWf_SetupRunAroundPlayer(this); EnWf_SetupRunAroundPlayer(this);
@ -658,7 +658,7 @@ void EnWf_RunAroundPlayer(EnWf* this, PlayState* play) {
} }
} }
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
baseRange = 150.0f; baseRange = 150.0f;
} }
@ -696,14 +696,14 @@ void EnWf_RunAroundPlayer(EnWf* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_WOLFOS_CRY); Actor_PlaySfx(&this->actor, NA_SE_EN_WOLFOS_CRY);
} }
if ((Math_CosS(angle1 - this->actor.shape.rot.y) < -0.85f) && !Actor_OtherIsTargeted(play, &this->actor) && if ((Math_CosS(angle1 - this->actor.shape.rot.y) < -0.85f) && !Actor_OtherIsLockedOn(play, &this->actor) &&
(this->actor.xzDistToPlayer <= 80.0f)) { (this->actor.xzDistToPlayer <= 80.0f)) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
} else { } else {
this->actionTimer--; this->actionTimer--;
if (this->actionTimer == 0) { if (this->actionTimer == 0) {
if (Actor_OtherIsTargeted(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) { if (Actor_OtherIsLockedOn(play, &this->actor) && (Rand_ZeroOne() > 0.5f)) {
EnWf_SetupBackflipAway(this); EnWf_SetupBackflipAway(this);
} else { } else {
EnWf_SetupWait(this); EnWf_SetupWait(this);
@ -747,7 +747,7 @@ void EnWf_Slash(EnWf* this, PlayState* play) {
this->slashStatus = 0; this->slashStatus = 0;
} }
if (((curFrame == 15) && !Actor_IsTargeted(play, &this->actor) && if (((curFrame == 15) && !Actor_IsLockedOn(play, &this->actor) &&
(!Actor_IsFacingPlayer(&this->actor, 0x2000) || (this->actor.xzDistToPlayer >= 100.0f))) || (!Actor_IsFacingPlayer(&this->actor, 0x2000) || (this->actor.xzDistToPlayer >= 100.0f))) ||
SkelAnime_Update(&this->skelAnime)) { SkelAnime_Update(&this->skelAnime)) {
if ((curFrame != 15) && (this->actionTimer != 0)) { if ((curFrame != 15) && (this->actionTimer != 0)) {
@ -850,7 +850,7 @@ void EnWf_SetupBackflipAway(EnWf* this) {
void EnWf_BackflipAway(EnWf* this, PlayState* play) { void EnWf_BackflipAway(EnWf* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) { if (SkelAnime_Update(&this->skelAnime)) {
if (!Actor_OtherIsTargeted(play, &this->actor) && (this->actor.xzDistToPlayer < 170.0f) && if (!Actor_OtherIsLockedOn(play, &this->actor) && (this->actor.xzDistToPlayer < 170.0f) &&
(this->actor.xzDistToPlayer > 140.0f) && (Rand_ZeroOne() < 0.2f)) { (this->actor.xzDistToPlayer > 140.0f) && (Rand_ZeroOne() < 0.2f)) {
EnWf_SetupRunAtPlayer(this, play); EnWf_SetupRunAtPlayer(this, play);
} else if ((play->gameplayFrames % 2) != 0) { } else if ((play->gameplayFrames % 2) != 0) {
@ -940,7 +940,7 @@ void EnWf_Damaged(EnWf* this, PlayState* play) {
(this->actor.xzDistToPlayer < 120.0f)) { (this->actor.xzDistToPlayer < 120.0f)) {
EnWf_SetupSomersaultAndAttack(this); EnWf_SetupSomersaultAndAttack(this);
} else if (!EnWf_DodgeRanged(play, this)) { } else if (!EnWf_DodgeRanged(play, this)) {
if ((this->actor.xzDistToPlayer <= 80.0f) && !Actor_OtherIsTargeted(play, &this->actor) && if ((this->actor.xzDistToPlayer <= 80.0f) && !Actor_OtherIsLockedOn(play, &this->actor) &&
((play->gameplayFrames % 8) != 0)) { ((play->gameplayFrames % 8) != 0)) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
} else if (Rand_ZeroOne() > 0.5f) { } else if (Rand_ZeroOne() > 0.5f) {
@ -985,7 +985,7 @@ void EnWf_SomersaultAndAttack(EnWf* this, PlayState* play) {
this->actor.speed = this->actor.velocity.y = 0.0f; this->actor.speed = this->actor.velocity.y = 0.0f;
this->actor.world.pos.y = this->actor.floorHeight; this->actor.world.pos.y = this->actor.floorHeight;
if (!Actor_OtherIsTargeted(play, &this->actor)) { if (!Actor_OtherIsLockedOn(play, &this->actor)) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
} else { } else {
EnWf_SetupWait(this); EnWf_SetupWait(this);
@ -1035,7 +1035,7 @@ void EnWf_Blocking(EnWf* this, PlayState* play) {
} else { } else {
s16 angleFacingLink = player->actor.shape.rot.y - this->actor.shape.rot.y; s16 angleFacingLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
if (!Actor_OtherIsTargeted(play, &this->actor) && if (!Actor_OtherIsLockedOn(play, &this->actor) &&
(((play->gameplayFrames % 2) != 0) || (ABS(angleFacingLink) < 0x38E0))) { (((play->gameplayFrames % 2) != 0) || (ABS(angleFacingLink) < 0x38E0))) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
} else { } else {
@ -1114,7 +1114,7 @@ void EnWf_Sidestep(EnWf* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.world.rot.y = this->actor.shape.rot.y;
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
baseRange = 150.0f; baseRange = 150.0f;
} }
@ -1159,7 +1159,7 @@ void EnWf_Sidestep(EnWf* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.world.rot.y = this->actor.shape.rot.y;
if ((this->actor.xzDistToPlayer <= 80.0f) && !Actor_OtherIsTargeted(play, &this->actor) && if ((this->actor.xzDistToPlayer <= 80.0f) && !Actor_OtherIsLockedOn(play, &this->actor) &&
(((play->gameplayFrames % 4) == 0) || (ABS(angleDiff2) < 0x38E0))) { (((play->gameplayFrames % 4) == 0) || (ABS(angleDiff2) < 0x38E0))) {
EnWf_SetupSlash(this); EnWf_SetupSlash(this);
} else { } else {

View file

@ -549,7 +549,7 @@ s32 EnZf_CanAttack(PlayState* play, EnZf* this) {
return true; return true;
} }
} else { } else {
if (!Actor_OtherIsTargeted(play, &this->actor)) { if (!Actor_OtherIsLockedOn(play, &this->actor)) {
return true; return true;
} }
if (this->actor.params == ENZF_TYPE_DINOLFOS) { if (this->actor.params == ENZF_TYPE_DINOLFOS) {
@ -836,7 +836,7 @@ void EnZf_ApproachPlayer(EnZf* this, PlayState* play) {
} }
} }
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
sp40 = 100.0f; sp40 = 100.0f;
} }
@ -897,7 +897,7 @@ void EnZf_ApproachPlayer(EnZf* this, PlayState* play) {
if ((this->actor.xzDistToPlayer < 180.0f) && (this->actor.xzDistToPlayer > 160.0f) && if ((this->actor.xzDistToPlayer < 180.0f) && (this->actor.xzDistToPlayer > 160.0f) &&
Actor_IsFacingPlayer(&this->actor, 0x71C)) { Actor_IsFacingPlayer(&this->actor, 0x71C)) {
if (Actor_IsTargeted(play, &this->actor)) { if (Actor_IsLockedOn(play, &this->actor)) {
if (Rand_ZeroOne() < 0.1f) { if (Rand_ZeroOne() < 0.1f) {
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
EnZf_SetupJumpForward(this); EnZf_SetupJumpForward(this);
@ -1113,7 +1113,7 @@ void func_80B463E4(EnZf* this, PlayState* play) {
} }
} }
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
baseRange = 100.0f; baseRange = 100.0f;
} }
@ -1224,7 +1224,7 @@ void EnZf_Slash(EnZf* this, PlayState* play) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer;
func_80B483E4(this, play); func_80B483E4(this, play);
} else if (player->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_13 | PLAYER_STATE1_14)) { } else if (player->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_13 | PLAYER_STATE1_14)) {
if (this->actor.isTargeted) { if (this->actor.isLockedOn) {
EnZf_SetupSlash(this); EnZf_SetupSlash(this);
} else { } else {
func_80B483E4(this, play); func_80B483E4(this, play);
@ -1827,7 +1827,7 @@ void EnZf_CircleAroundPlayer(EnZf* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y + 0x4000; this->actor.world.rot.y = this->actor.shape.rot.y + 0x4000;
if (Actor_OtherIsTargeted(play, &this->actor)) { if (Actor_OtherIsLockedOn(play, &this->actor)) {
baseRange = 100.0f; baseRange = 100.0f;
} }

View file

@ -487,8 +487,8 @@ Actor_ChangeCategory = 0x80026C14; // type:func
Actor_GetProjectileActor = 0x80026C54; // type:func Actor_GetProjectileActor = 0x80026C54; // type:func
Actor_SetTextWithPrefix = 0x80026E14; // type:func Actor_SetTextWithPrefix = 0x80026E14; // type:func
Actor_TestFloorInDirection = 0x80026E90; // type:func Actor_TestFloorInDirection = 0x80026E90; // type:func
Actor_IsTargeted = 0x80026F5C; // type:func Actor_IsLockedOn = 0x80026F5C; // type:func
Actor_OtherIsTargeted = 0x80026F90; // type:func Actor_OtherIsLockedOn = 0x80026F90; // type:func
func_80033AEC = 0x80026FC4; // type:func func_80033AEC = 0x80026FC4; // type:func
func_80033C30 = 0x80027110; // type:func func_80033C30 = 0x80027110; // type:func
Actor_RequestQuake = 0x8002725C; // type:func Actor_RequestQuake = 0x8002725C; // type:func