diff --git a/src/d_player.h b/src/d_player.h index 5097be68d..ef1c1219f 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -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 diff --git a/src/p_mobj.c b/src/p_mobj.c index 61049d9e1..c260391f7 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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;