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:
parent
4a9873775c
commit
92e03cf747
171 changed files with 1771 additions and 1773 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue