Fix a warning

This commit is contained in:
Sryder 2017-03-09 22:28:56 +00:00
parent ebd777fe8b
commit 546b98b4cb
1 changed files with 2 additions and 1 deletions

View File

@ -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);