diff --git a/src/p_mobj.c b/src/p_mobj.c index be16db9c6..634af46ae 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -295,15 +295,9 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state) boolean noalt = false; UINT8 spr2 = st->frame & FF_FRAMEMASK; UINT16 frame = (mobj->frame & FF_FRAMEMASK)+1; - if (mobj->sprite != SPR_PLAY) - { - mobj->sprite = SPR_PLAY; - frame = 0; - } - else if (mobj->sprite2 != spr2) - frame = 0; - while (&((skin_t *)mobj->skin)->sprites[spr2].numframes == 0 && spr2 != SPR2_STND) + while (((skin_t *)mobj->skin)->sprites[spr2].numframes <= 0 + && spr2 != SPR2_STND) { switch(spr2) { @@ -398,6 +392,14 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state) break; } + if (mobj->sprite != SPR_PLAY) + { + mobj->sprite = SPR_PLAY; + frame = 0; + } + else if (mobj->sprite2 != spr2) + frame = 0; + mobj->sprite2 = spr2; if (!mobj->skin || frame >= ((skin_t *)mobj->skin)->sprites[spr2].numframes) frame = 0; diff --git a/src/p_user.c b/src/p_user.c index 22644f6f5..cad107c7f 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3713,9 +3713,12 @@ static void P_DoSpinDash(player_t *player, ticcmd_t *cmd) S_StartSound(player->mo, sfx_spndsh); // Make the rev sound! // Now spawn the color thok circle. - P_SpawnSpinMobj(player, player->revitem); - if (demorecording) - G_GhostAddRev(); + if (player->mo->sprite2 != SPR2_DASH) + { + P_SpawnSpinMobj(player, player->revitem); + if (demorecording) + G_GhostAddRev(); + } } } // If not moving up or down, and travelling faster than a speed of four while not holding