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

@ -357,7 +357,7 @@ void EnDodongo_Destroy(Actor* thisx, PlayState* play) {
void EnDodongo_SetupIdle(EnDodongo* this) {
Animation_MorphToLoop(&this->skelAnime, &gDodongoWaitAnim, -4.0f);
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
this->timer = Rand_S16Offset(30, 50);
this->actionState = DODONGO_IDLE;
EnDodongo_SetupAction(this, EnDodongo_Idle);
@ -367,7 +367,7 @@ void EnDodongo_SetupWalk(EnDodongo* this) {
f32 frames = Animation_GetLastFrame(&gDodongoWalkAnim);
Animation_Change(&this->skelAnime, &gDodongoWalkAnim, 0.0f, 0.0f, frames, ANIMMODE_LOOP, -4.0f);
this->actor.speedXZ = 1.5f;
this->actor.speed = 1.5f;
this->timer = Rand_S16Offset(50, 70);
this->rightFootStep = true;
this->actionState = DODONGO_WALK;
@ -377,14 +377,14 @@ void EnDodongo_SetupWalk(EnDodongo* this) {
void EnDodongo_SetupBreatheFire(EnDodongo* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gDodongoBreatheFireAnim, -4.0f);
this->actionState = DODONGO_BREATHE_FIRE;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_BreatheFire);
}
void EnDodongo_SetupEndBreatheFire(EnDodongo* this) {
Animation_PlayOnce(&this->skelAnime, &gDodongoAfterBreatheFireAnim);
this->actionState = DODONGO_END_BREATHE_FIRE;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_EndBreatheFire);
}
@ -392,14 +392,14 @@ void EnDodongo_SetupSwallowBomb(EnDodongo* this) {
Animation_Change(&this->skelAnime, &gDodongoBreatheFireAnim, -1.0f, 35.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_SWALLOW_BOMB;
this->timer = 25;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_SwallowBomb);
}
void EnDodongo_SetupStunned(EnDodongo* this) {
Animation_Change(&this->skelAnime, &gDodongoBreatheFireAnim, 0.0f, 25.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_STUNNED;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
if (this->damageEffect == 0xF) {
this->iceTimer = 36;
}
@ -532,10 +532,10 @@ void EnDodongo_Walk(EnDodongo* this, PlayState* play) {
yawDiff = ABS(yawDiff);
Math_SmoothStepToF(&this->actor.speedXZ, 1.5f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&this->actor.speed, 1.5f, 0.1f, 1.0f, 0.0f);
playbackSpeed = this->actor.speedXZ * 0.75f;
if (this->actor.speedXZ >= 0.0f) {
playbackSpeed = this->actor.speed * 0.75f;
if (this->actor.speed >= 0.0f) {
if (playbackSpeed > 3.0f / 2) {
playbackSpeed = 3.0f / 2;
}
@ -596,7 +596,7 @@ void EnDodongo_SetupSweepTail(EnDodongo* this) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_DAMAGE);
this->actionState = DODONGO_SWEEP_TAIL;
this->timer = 0;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_SweepTail);
}
@ -664,7 +664,7 @@ void EnDodongo_SetupDeath(EnDodongo* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_DEAD);
this->actionState = DODONGO_DEATH;
this->actor.flags &= ~ACTOR_FLAG_0;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
EnDodongo_SetupAction(this, EnDodongo_Death);
}