diff --git a/src/d_player.h b/src/d_player.h index c62c8c566..9c8e7da59 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -163,6 +163,7 @@ typedef enum PA_IDLE, PA_WALK, PA_RUN, + PA_PAIN, PA_ROLL, PA_JUMP, PA_FALL, diff --git a/src/info.c b/src/info.c index 8dc694b5e..2a8f7d6a7 100644 --- a/src/info.c +++ b/src/info.c @@ -152,6 +152,7 @@ state_t states[NUMSTATES] = {SPR_PLAY, SPR2_SWLK, 7, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_WALK {SPR_PLAY, SPR2_SRUN, 7, {NULL}, 0, 0, S_PLAY_SUPER_RUN}, // S_PLAY_SUPER_RUN {SPR_PLAY, SPR2_SPAN, -1, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_PAIN + {SPR_PLAY, SPR2_SMSL, -1, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_STUN {SPR_PLAY, SPR2_SDTH, 4, {NULL}, 0, 0, S_PLAY_SUPER_DEAD}, // S_PLAY_SUPER_DEAD {SPR_PLAY, SPR2_SDRN, 4, {NULL}, 0, 0, S_PLAY_SUPER_DRWN}, // S_PLAY_SUPER_DRWN {SPR_PLAY, SPR2_SSPN, 1, {NULL}, 0, 0, S_PLAY_SUPER_SPIN}, // S_PLAY_SUPER_SPIN diff --git a/src/info.h b/src/info.h index 585d8c745..836e87e21 100644 --- a/src/info.h +++ b/src/info.h @@ -607,6 +607,7 @@ enum playersprite SPR2_SWLK, SPR2_SRUN, SPR2_SPAN, + SPR2_SMSL, SPR2_SDTH, SPR2_SDRN, SPR2_SSPN, @@ -666,6 +667,7 @@ typedef enum state S_PLAY_SUPER_WALK, S_PLAY_SUPER_RUN, S_PLAY_SUPER_PAIN, + S_PLAY_SUPER_STUN, S_PLAY_SUPER_DEAD, S_PLAY_SUPER_DRWN, S_PLAY_SUPER_SPIN, diff --git a/src/p_inter.c b/src/p_inter.c index 1c035268f..2483cf17e 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2587,7 +2587,7 @@ static inline void P_SuperDamage(player_t *player, mobj_t *inflictor, mobj_t *so P_InstaThrust(player->mo, ang, fallbackspeed); if (player->charflags & SF_SUPERANIMS) - P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_PAIN); + P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_STUN); else P_SetPlayerMobjState(player->mo, player->mo->info->painstate); diff --git a/src/p_mobj.c b/src/p_mobj.c index 7eafec697..be16db9c6 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -196,6 +196,11 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state) case S_PLAY_SUPER_RUN: player->panim = PA_RUN; break; + case S_PLAY_PAIN: + case S_PLAY_SUPER_PAIN: + case S_PLAY_SUPER_STUN: + player->panim = PA_PAIN; + break; case S_PLAY_SPIN: case S_PLAY_DASH: case S_PLAY_SUPER_SPIN: @@ -356,6 +361,9 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state) case SPR2_SPAN: spr2 = SPR2_PAIN; break; + case SPR2_SMSL: + spr2 = SPR2_SPAN; + break; case SPR2_SDTH: spr2 = SPR2_DEAD; break; @@ -2165,7 +2173,7 @@ static void P_PlayerZMovement(mobj_t *mo) goto nightsdone; } // Get up if you fell. - if (mo->state == &states[mo->info->painstate] || mo->state-states == S_PLAY_SUPER_PAIN) + if (mo->player->panim == PA_PAIN) P_SetPlayerMobjState(mo, S_PLAY_STND); if (P_MobjFlip(mo)*mo->momz < 0) // falling