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:
toasterbabe 2016-07-15 17:30:52 +01:00
parent 01dc98f8f0
commit 03fe312490
2 changed files with 3 additions and 2 deletions

View file

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

View file

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