summaryrefslogtreecommitdiff
path: root/src/code/z_lib.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2024-02-02 03:15:53 +1100
committerGitHub <noreply@github.com>2024-02-01 11:15:53 -0500
commite33d76568c8b71f98b7a6754a8527eb82b152f55 (patch)
treefc3539dac623fcb2047da0974b4dbd8dd8f1d48a /src/code/z_lib.c
parent7c5ab8fcec149bedc6bcd62505cfe4fc91d4a7a1 (diff)
Misc Small Retail Files OK (#1687)
* shrink_window, z_lib, z_lights OK * sys_cfb.c OK * cleanup
Diffstat (limited to 'src/code/z_lib.c')
-rw-r--r--src/code/z_lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index cc665fd0c..58a291162 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -407,8 +407,10 @@ void IChain_Apply_Vec3s(u8* ptr, InitChainEntry* ichain) {
* instead, with a minimum step of minStep. Returns remaining distance to target.
*/
f32 Math_SmoothStepToF(f32* pValue, f32 target, f32 fraction, f32 step, f32 minStep) {
+ f32 stepSize;
+
if (*pValue != target) {
- f32 stepSize = (target - *pValue) * fraction;
+ stepSize = (target - *pValue) * fraction;
if ((stepSize >= minStep) || (stepSize <= -minStep)) {
if (stepSize > step) {