Fixing SF_NOSUPERSPIN, which has been broken ever since the super walk animation was added.

This commit is contained in:
toasterbabe 2017-03-27 14:22:03 +01:00
parent 698e53a518
commit 302305ccf5

View file

@ -408,10 +408,15 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
return P_SetPlayerMobjState(player->mo, S_PLAY_FLY); return P_SetPlayerMobjState(player->mo, S_PLAY_FLY);
// Catch SF_NOSUPERSPIN jumps for Supers // Catch SF_NOSUPERSPIN jumps for Supers
if (player->powers[pw_super]) if (player->powers[pw_super] && (player->charflags & SF_NOSUPERSPIN))
{ {
if ((player->charflags & SF_NOSUPERSPIN) if (state == S_PLAY_JUMP)
&& (state == S_PLAY_ROLL || state == S_PLAY_JUMP)) {
if (player->mo->state-states == S_PLAY_WALK)
return P_SetPlayerMobjState(mobj, S_PLAY_FLOAT);
return true;
}
else if (player->mo->state-states == S_PLAY_FLOAT && state == S_PLAY_STND)
return true; return true;
} }
// You were in pain state after taking a hit, and you're moving out of pain state now? // You were in pain state after taking a hit, and you're moving out of pain state now?