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

@ -131,20 +131,20 @@ void EnBom_Move(EnBom* this, PlayState* play) {
}
// rebound bomb off the wall it hits
if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
if ((this->actor.speed != 0.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
if (ABS((s16)(this->actor.wallYaw - this->actor.world.rot.y)) > 0x4000) {
this->actor.world.rot.y = ((this->actor.wallYaw - this->actor.world.rot.y) + this->actor.wallYaw) - 0x8000;
}
Actor_PlaySfx(&this->actor, NA_SE_EV_BOMB_BOUND);
Actor_MoveForward(&this->actor);
this->actor.speedXZ *= 0.7f;
this->actor.speed *= 0.7f;
this->actor.bgCheckFlags &= ~BGCHECKFLAG_WALL;
}
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.08f);
Math_StepToF(&this->actor.speed, 0.0f, 0.08f);
} else {
Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f);
Math_StepToF(&this->actor.speed, 0.0f, 1.0f);
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -3.0f)) {
func_8002F850(play, &this->actor);
this->actor.velocity.y *= -0.3f;