1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 23:41:24 +00:00

speedXZ -> speed (#1477)

* speedXZ -> speed

* +=

* revert arg in player function

* anon review

* engineer review

* forgot one

* last review

* revert decimal
This commit is contained in:
fig02 2022-12-24 12:18:57 -05:00 committed by GitHub
parent 4a9873775c
commit 92e03cf747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
171 changed files with 1771 additions and 1773 deletions

View file

@ -189,7 +189,7 @@ void EnDh_SetupWait(EnDh* this) {
this->actor.world.pos.x = Rand_CenteredFloat(600.0f) + this->actor.home.pos.x;
this->actor.world.pos.z = Rand_CenteredFloat(600.0f) + this->actor.home.pos.z;
this->actor.shape.yOffset = -15000.0f;
this->dirtWaveSpread = this->actor.speedXZ = 0.0f;
this->dirtWaveSpread = this->actor.speed = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actor.flags |= ACTOR_FLAG_7;
this->dirtWavePhase = this->actionState = this->actor.params = ENDH_WAIT_UNDERGROUND;
@ -243,7 +243,7 @@ void EnDh_SetupWalk(EnDh* this) {
Animation_GetLastFrame(&object_dh_Anim_003A8C) - 3.0f, ANIMMODE_LOOP, -6.0f);
this->curAction = DH_WALK;
this->timer = 300;
this->actor.speedXZ = 1.0f;
this->actor.speed = 1.0f;
EnDh_SetupAction(this, EnDh_Walk);
}
@ -258,7 +258,7 @@ void EnDh_Walk(EnDh* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_LAUGH);
}
if (this->actor.xzDistToPlayer <= 100.0f) {
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
if (Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360)) {
EnDh_SetupAttack(this);
}
@ -271,7 +271,7 @@ void EnDh_SetupRetreat(EnDh* this, PlayState* play) {
Animation_MorphToLoop(&this->skelAnime, &object_dh_Anim_005880, -4.0f);
this->curAction = DH_RETREAT;
this->timer = 70;
this->actor.speedXZ = 1.0f;
this->actor.speed = 1.0f;
EnDh_SetupAction(this, EnDh_Retreat);
}
@ -291,7 +291,7 @@ void EnDh_SetupAttack(EnDh* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_004658, -6.0f);
this->timer = this->actionState = 0;
this->curAction = DH_ATTACK;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
EnDh_SetupAction(this, EnDh_Attack);
}
@ -360,7 +360,7 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
void EnDh_SetupBurrow(EnDh* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_002148, -6.0f);
this->curAction = DH_BURROW;
this->dirtWaveSpread = this->actor.speedXZ = 0.0f;
this->dirtWaveSpread = this->actor.speed = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->dirtWavePhase = 0;
this->actionState = 0;
@ -403,7 +403,7 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
void EnDh_SetupDamage(EnDh* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_003D6C, -6.0f);
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
this->actor.speedXZ = -1.0f;
this->actor.speed = -1.0f;
}
Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_DAMAGE);
this->curAction = DH_DAMAGE;
@ -411,8 +411,8 @@ void EnDh_SetupDamage(EnDh* this) {
}
void EnDh_Damage(EnDh* this, PlayState* play) {
if (this->actor.speedXZ < 0.0f) {
this->actor.speedXZ += 0.15f;
if (this->actor.speed < 0.0f) {
this->actor.speed += 0.15f;
}
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
if (SkelAnime_Update(&this->skelAnime)) {
@ -436,7 +436,7 @@ void EnDh_SetupDeath(EnDh* this) {
this->curAction = DH_DEATH;
this->timer = 300;
this->actor.flags &= ~ACTOR_FLAG_0;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
func_800F5B58();
this->actor.params = ENDH_DEATH;
Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_DEAD);