mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add PA_EDGE to handle Super teeter animation bug.
States were being improperly checked where a panim would be more appropriate.
This commit is contained in:
parent
b17e39a701
commit
ffec58c09c
4 changed files with 9 additions and 5 deletions
|
|
@ -161,6 +161,7 @@ typedef enum
|
||||||
// Are animation frames playing?
|
// Are animation frames playing?
|
||||||
PA_ETC=0,
|
PA_ETC=0,
|
||||||
PA_IDLE,
|
PA_IDLE,
|
||||||
|
PA_EDGE,
|
||||||
PA_WALK,
|
PA_WALK,
|
||||||
PA_RUN,
|
PA_RUN,
|
||||||
PA_PAIN,
|
PA_PAIN,
|
||||||
|
|
|
||||||
|
|
@ -7665,6 +7665,7 @@ struct {
|
||||||
// Player animation (panim_t)
|
// Player animation (panim_t)
|
||||||
{"PA_ETC",PA_ETC},
|
{"PA_ETC",PA_ETC},
|
||||||
{"PA_IDLE",PA_IDLE},
|
{"PA_IDLE",PA_IDLE},
|
||||||
|
{"PA_EDGE",PA_EDGE},
|
||||||
{"PA_WALK",PA_WALK},
|
{"PA_WALK",PA_WALK},
|
||||||
{"PA_RUN",PA_RUN},
|
{"PA_RUN",PA_RUN},
|
||||||
{"PA_PAIN",PA_PAIN},
|
{"PA_PAIN",PA_PAIN},
|
||||||
|
|
|
||||||
|
|
@ -183,11 +183,13 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
||||||
{
|
{
|
||||||
case S_PLAY_STND:
|
case S_PLAY_STND:
|
||||||
case S_PLAY_WAIT:
|
case S_PLAY_WAIT:
|
||||||
case S_PLAY_EDGE:
|
|
||||||
case S_PLAY_SUPER_STND:
|
case S_PLAY_SUPER_STND:
|
||||||
case S_PLAY_SUPER_EDGE:
|
|
||||||
player->panim = PA_IDLE;
|
player->panim = PA_IDLE;
|
||||||
break;
|
break;
|
||||||
|
case S_PLAY_EDGE:
|
||||||
|
case S_PLAY_SUPER_EDGE:
|
||||||
|
player->panim = PA_EDGE;
|
||||||
|
break;
|
||||||
case S_PLAY_WALK:
|
case S_PLAY_WALK:
|
||||||
case S_PLAY_SUPER_WALK:
|
case S_PLAY_SUPER_WALK:
|
||||||
player->panim = PA_WALK;
|
player->panim = PA_WALK;
|
||||||
|
|
|
||||||
|
|
@ -3078,10 +3078,10 @@ teeterdone:
|
||||||
}
|
}
|
||||||
if (teeter)
|
if (teeter)
|
||||||
{
|
{
|
||||||
if (player->panim == PA_IDLE && player->mo->state-states != S_PLAY_EDGE)
|
if (player->panim == PA_IDLE)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_EDGE);
|
P_SetPlayerMobjState(player->mo, S_PLAY_EDGE);
|
||||||
}
|
}
|
||||||
else if (checkedforteeter && (player->mo->state-states == S_PLAY_EDGE || player->mo->state-states == S_PLAY_SUPER_EDGE))
|
else if (checkedforteeter && player->panim == PA_EDGE)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6884,7 +6884,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure you're not teetering when you shouldn't be.
|
// Make sure you're not teetering when you shouldn't be.
|
||||||
if ((player->mo->state-states == S_PLAY_EDGE || player->mo->state-states == S_PLAY_SUPER_EDGE)
|
if (player->panim == PA_EDGE
|
||||||
&& (player->mo->momx || player->mo->momy || player->mo->momz))
|
&& (player->mo->momx || player->mo->momy || player->mo->momz))
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue