mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +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
|
||||
// if more than var1 away from it, swap back to the original
|
||||
// else just advance by one
|
||||
if ((mobj->frame & FF_FRAMEMASK) - (mobj->state->frame & FF_FRAMEMASK) < (UINT32)mobj->state->var1)
|
||||
++mobj->frame;
|
||||
else
|
||||
if (((++mobj->frame) & FF_FRAMEMASK) - (mobj->state->frame & FF_FRAMEMASK) > (UINT32)mobj->state->var1)
|
||||
mobj->frame = (mobj->state->frame & FF_FRAMEMASK) | (mobj->frame & ~FF_FRAMEMASK);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue