mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-29 16:26:18 +00:00
Fix UB in func_80B537E8. (#943)
This commit is contained in:
parent
2862aa6d03
commit
d874cd08fc
1 changed files with 4 additions and 4 deletions
|
@ -173,13 +173,13 @@ s32 func_80B537E8(EnZl3* this) {
|
||||||
s16 yawTowardsPlayer = this->actor.yawTowardsPlayer;
|
s16 yawTowardsPlayer = this->actor.yawTowardsPlayer;
|
||||||
s16* rotY = &this->actor.world.rot.y;
|
s16* rotY = &this->actor.world.rot.y;
|
||||||
s16* unk_3D0 = &this->unk_3D0;
|
s16* unk_3D0 = &this->unk_3D0;
|
||||||
s16 pad[3];
|
s16 retVal;
|
||||||
|
s16 pad[2];
|
||||||
|
|
||||||
Math_SmoothStepToS(unk_3D0, ABS((s16)(yawTowardsPlayer - *rotY)), 5, 6200, 100);
|
Math_SmoothStepToS(unk_3D0, ABS((s16)(yawTowardsPlayer - *rotY)), 5, 6200, 100);
|
||||||
Math_SmoothStepToS(rotY, yawTowardsPlayer, 5, *unk_3D0, 100);
|
retVal = Math_SmoothStepToS(rotY, yawTowardsPlayer, 5, *unk_3D0, 100);
|
||||||
this->actor.shape.rot.y = *rotY;
|
this->actor.shape.rot.y = *rotY;
|
||||||
// no return statement despite being of type s32
|
return retVal;
|
||||||
// the function directly below needs this to not be void I guess
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80B538B0(EnZl3* this) {
|
void func_80B538B0(EnZl3* this) {
|
||||||
|
|
Loading…
Reference in a new issue