From dea896c8743475508a3c7391e9d19cdb6b63f6a7 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Wed, 15 Mar 2023 21:00:18 -0700 Subject: [PATCH] SubS_ComputeTrackPointRot casts --- src/code/z_sub_s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c index 6650f41a7a..649f364224 100644 --- a/src/code/z_sub_s.c +++ b/src/code/z_sub_s.c @@ -1023,13 +1023,13 @@ s16 SubS_ComputeTrackPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f3 f32 step; f32 prevRotStep; - step = (f32)(target - *rot) * (360.0f / (f32)0x10000); + step = (f32)(target - *rot) * (360.0f / 0x10000); step *= gFramerateDivisorHalf; prevRotStep = step; if (step >= 0.0f) { step /= slowness; step = CLAMP(step, stepMin, stepMax); - *rot += (s16)((step * (f32)0x10000) / 360.0f); + *rot += (s16)((step * 0x10000) / 360.0f); if (prevRotStep < stepMin) { *rot = target; } @@ -1039,7 +1039,7 @@ s16 SubS_ComputeTrackPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f3 } else { step = (step / slowness) * -1.0f; step = CLAMP(step, stepMin, stepMax); - *rot -= (s16)((step * (f32)0x10000) / 360.0f); + *rot -= (s16)((step * 0x10000) / 360.0f); if (-stepMin < prevRotStep) { *rot = target; }