mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-10 19:20:13 +00:00
match function (#1737)
This commit is contained in:
parent
488b0e7783
commit
f492c04186
1 changed files with 16 additions and 23 deletions
|
@ -7937,8 +7937,6 @@ void Player_Action_8084193C(Player* this, PlayState* play) {
|
||||||
f32 speedTarget;
|
f32 speedTarget;
|
||||||
s16 yawTarget;
|
s16 yawTarget;
|
||||||
s32 temp1;
|
s32 temp1;
|
||||||
s16 temp2;
|
|
||||||
s32 temp3;
|
|
||||||
|
|
||||||
func_80841860(play, this);
|
func_80841860(play, this);
|
||||||
|
|
||||||
|
@ -7958,42 +7956,37 @@ void Player_Action_8084193C(Player* this, PlayState* play) {
|
||||||
|
|
||||||
if (temp1 > 0) {
|
if (temp1 > 0) {
|
||||||
func_8083C858(this, play);
|
func_8083C858(this, play);
|
||||||
return;
|
} else if (temp1 < 0) {
|
||||||
}
|
|
||||||
|
|
||||||
if (temp1 < 0) {
|
|
||||||
if (func_80833B2C(this)) {
|
if (func_80833B2C(this)) {
|
||||||
func_8083CB2C(this, yawTarget, play);
|
func_8083CB2C(this, yawTarget, play);
|
||||||
} else {
|
} else {
|
||||||
func_8083CBF0(this, yawTarget, play);
|
func_8083CBF0(this, yawTarget, play);
|
||||||
}
|
}
|
||||||
return;
|
} else if ((this->speedXZ < 3.6f) && (speedTarget < 4.0f)) {
|
||||||
}
|
|
||||||
|
|
||||||
if ((this->speedXZ < 3.6f) && (speedTarget < 4.0f)) {
|
|
||||||
if (!func_8008E9C4(this) && func_80833B2C(this)) {
|
if (!func_8008E9C4(this) && func_80833B2C(this)) {
|
||||||
func_8083CB94(this, play);
|
func_8083CB94(this, play);
|
||||||
} else {
|
} else {
|
||||||
func_80839F90(this, play);
|
func_80839F90(this, play);
|
||||||
}
|
}
|
||||||
return;
|
} else {
|
||||||
}
|
s16 temp2;
|
||||||
|
s32 temp3;
|
||||||
|
|
||||||
func_80840138(this, speedTarget, yawTarget);
|
func_80840138(this, speedTarget, yawTarget);
|
||||||
|
|
||||||
temp2 = yawTarget - this->yaw;
|
temp2 = yawTarget - this->yaw;
|
||||||
temp3 = ABS(temp2);
|
temp3 = ABS(temp2);
|
||||||
|
|
||||||
if (temp3 > 0x4000) {
|
if (temp3 > 0x4000) {
|
||||||
if (Math_StepToF(&this->speedXZ, 0.0f, 3.0f) != 0) {
|
if (Math_StepToF(&this->speedXZ, 0.0f, 3.0f) != 0) {
|
||||||
this->yaw = yawTarget;
|
this->yaw = yawTarget;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
speedTarget *= 0.9f;
|
||||||
|
Math_AsymStepToF(&this->speedXZ, speedTarget, 2.0f, 3.0f);
|
||||||
|
Math_ScaledStepToS(&this->yaw, yawTarget, temp3 * 0.1f);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
speedTarget *= 0.9f;
|
|
||||||
Math_AsymStepToF(&this->speedXZ, speedTarget, 2.0f, 3.0f);
|
|
||||||
Math_ScaledStepToS(&this->yaw, yawTarget, temp3 * 0.1f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue