mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Fixed off-by-one error with the relationship between FF_ANIMATE's var1/number of frames, FF_MIDDLESTARTCHANCE, and P_RandomKey.
This commit is contained in:
parent
cf9ea19d11
commit
e801c581d3
1 changed files with 2 additions and 2 deletions
|
@ -622,7 +622,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
mobj->sprite = st->sprite;
|
||||
mobj->frame = st->frame;
|
||||
if ((st->frame & (FF_ANIMATE|FF_MIDDLESTARTCHANCE)) == (FF_ANIMATE|FF_MIDDLESTARTCHANCE))
|
||||
mobj->frame += P_RandomKey(st->var1);
|
||||
mobj->frame += P_RandomKey(st->var1+1);
|
||||
}
|
||||
|
||||
// Modified handling.
|
||||
|
@ -737,7 +737,7 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state)
|
|||
mobj->sprite = st->sprite;
|
||||
mobj->frame = st->frame;
|
||||
if ((st->frame & (FF_ANIMATE|FF_MIDDLESTARTCHANCE)) == (FF_ANIMATE|FF_MIDDLESTARTCHANCE))
|
||||
mobj->frame += P_RandomKey(st->var1);
|
||||
mobj->frame += P_RandomKey(st->var1+1);
|
||||
}
|
||||
|
||||
// Modified handling.
|
||||
|
|
Loading…
Reference in a new issue