1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 22:11:16 +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

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