mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
istargeted -> islockedon (#2132)
This commit is contained in:
parent
dc469461a9
commit
6051251c92
15 changed files with 78 additions and 78 deletions
|
@ -335,7 +335,7 @@ void EnTest_ChooseRandomAction(EnTest* this, PlayState* play) {
|
|||
case 5:
|
||||
case 6:
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
|
|||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
EnTest_SetupJumpBack(this);
|
||||
} 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);
|
||||
}
|
||||
} else {
|
||||
|
@ -405,7 +405,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
|
|||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (this->actor.isTargeted) {
|
||||
if (this->actor.isLockedOn) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
func_808627C4(this, play);
|
||||
|
@ -512,7 +512,7 @@ void EnTest_Idle(EnTest* this, PlayState* play) {
|
|||
if (Actor_IsFacingPlayer(&this->actor, 0x1555)) {
|
||||
if ((this->actor.xzDistToPlayer < 220.0f) && (this->actor.xzDistToPlayer > 160.0f) &&
|
||||
(Rand_ZeroOne() < 0.3f)) {
|
||||
if (Actor_IsTargeted(play, &this->actor)) {
|
||||
if (Actor_IsLockedOn(play, &this->actor)) {
|
||||
EnTest_SetupJumpslash(this);
|
||||
} else {
|
||||
func_808627C4(this, play);
|
||||
|
@ -578,7 +578,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
|
|||
if (!EnTest_ReactToProjectile(play, this)) {
|
||||
this->timer++;
|
||||
|
||||
if (Actor_OtherIsTargeted(play, &this->actor)) {
|
||||
if (Actor_OtherIsLockedOn(play, &this->actor)) {
|
||||
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) &&
|
||||
(Actor_IsFacingPlayer(&this->actor, 0x71C))) {
|
||||
if (Actor_IsTargeted(play, &this->actor)) {
|
||||
if (Actor_IsLockedOn(play, &this->actor)) {
|
||||
if (Rand_ZeroOne() < 0.1f) {
|
||||
EnTest_SetupJumpslash(this);
|
||||
return;
|
||||
}
|
||||
} else if (player->heldItemAction != PLAYER_IA_NONE) {
|
||||
if (this->actor.isTargeted) {
|
||||
if (this->actor.isLockedOn) {
|
||||
if ((play->gameplayFrames % 2) != 0) {
|
||||
func_808627C4(this, play);
|
||||
return;
|
||||
|
@ -691,7 +691,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
|
|||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (this->actor.isTargeted) {
|
||||
if (this->actor.isLockedOn) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -976,7 +976,7 @@ void EnTest_SlashDownEnd(EnTest* this, PlayState* play) {
|
|||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (this->actor.isTargeted) {
|
||||
if (this->actor.isLockedOn) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else if ((play->gameplayFrames % 2) != 0) {
|
||||
func_808627C4(this, play);
|
||||
|
@ -1345,7 +1345,7 @@ void EnTest_Stunned(EnTest* this, PlayState* play) {
|
|||
|
||||
// a variation of sidestep
|
||||
void func_808627C4(EnTest* this, PlayState* play) {
|
||||
if (Actor_OtherIsTargeted(play, &this->actor)) {
|
||||
if (Actor_OtherIsLockedOn(play, &this->actor)) {
|
||||
func_80860EC0(this);
|
||||
return;
|
||||
}
|
||||
|
@ -1421,7 +1421,7 @@ void func_808628C8(EnTest* this, PlayState* play) {
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1457,9 +1457,9 @@ void func_808628C8(EnTest* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
if (Actor_OtherIsTargeted(play, &this->actor)) {
|
||||
if (Actor_OtherIsLockedOn(play, &this->actor)) {
|
||||
EnTest_SetupIdle(this);
|
||||
} else if (Actor_IsTargeted(play, &this->actor)) {
|
||||
} else if (Actor_IsLockedOn(play, &this->actor)) {
|
||||
if (!EnTest_ReactToProjectile(play, this)) {
|
||||
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 (Actor_IsTargeted(play, &this->actor) && (projectileActor->id == ACTOR_ARMS_HOOK)) {
|
||||
if (Actor_IsLockedOn(play, &this->actor) && (projectileActor->id == ACTOR_ARMS_HOOK)) {
|
||||
EnTest_SetupJumpUp(this);
|
||||
} else if (ABS(yawToProjectile) < 0x2000) {
|
||||
EnTest_SetupStopAndBlock(this);
|
||||
|
@ -2020,7 +2020,7 @@ s32 EnTest_ReactToProjectile(PlayState* play, EnTest* this) {
|
|||
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);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue