From 546b98b4cb3f487d22c7422b5f50fb81823c3442 Mon Sep 17 00:00:00 2001 From: Sryder Date: Thu, 9 Mar 2017 22:28:56 +0000 Subject: [PATCH] Fix a warning --- src/p_mobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 4d0484fa..c63a8721 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7405,13 +7405,14 @@ void P_MobjThinker(mobj_t *mobj) break; case MT_REDITEM: { + fixed_t magnitude; if (mobj->threshold > 0) mobj->threshold--; if (leveltime % 7 == 0) S_StartSound(mobj, mobj->info->activesound); // Do a similar thing to what is done to the player to keep the red shell at a speed cap - fixed_t magnitude = P_AproxDistance(mobj->momx, mobj->momy); + magnitude = P_AproxDistance(mobj->momx, mobj->momy); if (magnitude > 64*FRACUNIT) { mobj->momx = FixedMul(FixedDiv(mobj->momx, magnitude), 64*FRACUNIT);