mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +00:00
sword -> meleeWeapon (#1147)
This commit is contained in:
parent
b9cc31dc74
commit
145b14dbc4
24 changed files with 194 additions and 182 deletions
|
@ -492,10 +492,10 @@ void EnTest_Idle(EnTest* this, GlobalContext* globalCtx) {
|
|||
yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||
|
||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
if ((player->swordState != 0) && (ABS(yawDiff) >= 0x1F40)) {
|
||||
if ((player->meleeWeaponState != 0) && (ABS(yawDiff) >= 0x1F40)) {
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
|
||||
if (Rand_ZeroOne() > 0.7f && player->swordAnimation != 0x11) {
|
||||
if (Rand_ZeroOne() > 0.7f && player->meleeWeaponAnimation != 0x11) {
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else {
|
||||
func_808627C4(this, globalCtx);
|
||||
|
@ -622,11 +622,11 @@ void EnTest_WalkAndBlock(EnTest* this, GlobalContext* globalCtx) {
|
|||
|
||||
yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && (player->swordState != 0)) {
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != 0)) {
|
||||
if (ABS(yawDiff) >= 0x1F40) {
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
|
||||
if ((Rand_ZeroOne() > 0.7f) && (player->swordAnimation != 0x11)) {
|
||||
if ((Rand_ZeroOne() > 0.7f) && (player->meleeWeaponAnimation != 0x11)) {
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else {
|
||||
EnTest_SetupStopAndBlock(this);
|
||||
|
@ -1233,13 +1233,13 @@ void func_808621D4(EnTest* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (player->swordState != 0) {
|
||||
if (player->meleeWeaponState != 0) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) &&
|
||||
((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
||||
(this->actor.xzDistToPlayer < 80.0f))) {
|
||||
EnTest_SetupJumpUp(this);
|
||||
} else if ((Rand_ZeroOne() > 0.7f) && (this->actor.params != STALFOS_TYPE_CEILING) &&
|
||||
(player->swordAnimation != 0x11)) {
|
||||
(player->meleeWeaponAnimation != 0x11)) {
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else {
|
||||
EnTest_SetupStopAndBlock(this);
|
||||
|
@ -1273,13 +1273,13 @@ void func_80862418(EnTest* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (player->swordState != 0) {
|
||||
if (player->meleeWeaponState != 0) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) &&
|
||||
((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
||||
(this->actor.xzDistToPlayer < 80.0f))) {
|
||||
EnTest_SetupJumpUp(this);
|
||||
} else if ((Rand_ZeroOne() > 0.7f) && (this->actor.params != STALFOS_TYPE_CEILING) &&
|
||||
(player->swordAnimation != 0x11)) {
|
||||
(player->meleeWeaponAnimation != 0x11)) {
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else {
|
||||
EnTest_SetupStopAndBlock(this);
|
||||
|
@ -1320,12 +1320,12 @@ void EnTest_Stunned(EnTest* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.colorFilterTimer == 0) {
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
func_80862FA8(this, globalCtx);
|
||||
} else if (player->swordState != 0) {
|
||||
} else if (player->meleeWeaponState != 0) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) &&
|
||||
((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
||||
(this->actor.xzDistToPlayer < 80.0f))) {
|
||||
EnTest_SetupJumpUp(this);
|
||||
} else if ((Rand_ZeroOne() > 0.7f) && (player->swordAnimation != 0x11)) {
|
||||
} else if ((Rand_ZeroOne() > 0.7f) && (player->meleeWeaponAnimation != 0x11)) {
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else {
|
||||
EnTest_SetupStopAndBlock(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue