mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
On MI's reccomendation, a skin flag to disable the effects of FF_MIDDLESTARTCHANCE for specific characters whose animations might not be symmetrical.
This commit is contained in:
parent
01dc98f8f0
commit
03fe312490
2 changed files with 3 additions and 2 deletions
|
@ -43,6 +43,7 @@ typedef enum
|
|||
SF_NOJUMPDAMAGE = 1<<8, // Don't damage enemies, etc whilst jumping?
|
||||
SF_STOMPDAMAGE = 1<<9, // Always damage enemies, etc by landing on them, no matter your vunerability?
|
||||
SF_MARIODAMAGE = SF_NOJUMPDAMAGE|SF_STOMPDAMAGE, // The Mario method of being able to damage enemies, etc.
|
||||
SF_NOMIDDLESTART = 1<<10, // Some animations can randomly start you halfway through. Disable this?
|
||||
} skinflags_t;
|
||||
|
||||
//Primary and secondary skin abilities
|
||||
|
|
|
@ -462,7 +462,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
}
|
||||
else if (mobj->sprite2 != spr2)
|
||||
{
|
||||
if ((st->frame & FF_MIDDLESTARTCHANCE) && numframes && P_RandomChance(FRACUNIT/2))
|
||||
if ((st->frame & FF_MIDDLESTARTCHANCE) && !(player->charflags & SF_NOMIDDLESTART) && numframes && P_RandomChance(FRACUNIT/2))
|
||||
frame = numframes/2;
|
||||
else
|
||||
frame = 0;
|
||||
|
@ -582,7 +582,7 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state)
|
|||
}
|
||||
else if (mobj->sprite2 != spr2)
|
||||
{
|
||||
if ((st->frame & FF_MIDDLESTARTCHANCE) && numframes && P_RandomChance(FRACUNIT/2))
|
||||
if ((st->frame & FF_MIDDLESTARTCHANCE) && !(player->charflags & SF_NOMIDDLESTART) && numframes && P_RandomChance(FRACUNIT/2))
|
||||
frame = numframes/2;
|
||||
else
|
||||
frame = 0;
|
||||
|
|
Loading…
Reference in a new issue