mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Very minor performance improvement.
This commit is contained in:
parent
04d334d454
commit
f10279d61b
1 changed files with 1 additions and 3 deletions
|
@ -92,9 +92,7 @@ FUNCINLINE static ATTRINLINE void P_CycleStateAnimation(mobj_t *mobj)
|
||||||
// compare the current sprite frame to the one we started from
|
// compare the current sprite frame to the one we started from
|
||||||
// if more than var1 away from it, swap back to the original
|
// if more than var1 away from it, swap back to the original
|
||||||
// else just advance by one
|
// else just advance by one
|
||||||
if ((mobj->frame & FF_FRAMEMASK) - (mobj->state->frame & FF_FRAMEMASK) < (UINT32)mobj->state->var1)
|
if (((++mobj->frame) & FF_FRAMEMASK) - (mobj->state->frame & FF_FRAMEMASK) > (UINT32)mobj->state->var1)
|
||||||
++mobj->frame;
|
|
||||||
else
|
|
||||||
mobj->frame = (mobj->state->frame & FF_FRAMEMASK) | (mobj->frame & ~FF_FRAMEMASK);
|
mobj->frame = (mobj->state->frame & FF_FRAMEMASK) | (mobj->frame & ~FF_FRAMEMASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue