mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Update panim for the new states
This commit is contained in:
parent
480e32d369
commit
e2e342f3f7
4 changed files with 30 additions and 34 deletions
|
|
@ -115,19 +115,11 @@ typedef enum
|
||||||
{
|
{
|
||||||
// Are animation frames playing?
|
// Are animation frames playing?
|
||||||
PA_ETC=0,
|
PA_ETC=0,
|
||||||
PA_IDLE,
|
PA_STILL,
|
||||||
PA_EDGE,
|
PA_SLOW,
|
||||||
PA_WALK,
|
PA_FAST,
|
||||||
PA_RUN,
|
PA_DRIFT,
|
||||||
PA_DASH,
|
PA_HURT
|
||||||
PA_PAIN,
|
|
||||||
PA_ROLL,
|
|
||||||
PA_JUMP,
|
|
||||||
PA_SPRING,
|
|
||||||
PA_FALL,
|
|
||||||
PA_ABILITY,
|
|
||||||
PA_ABILITY2,
|
|
||||||
PA_RIDE
|
|
||||||
} panim_t;
|
} panim_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -11434,19 +11434,11 @@ struct {
|
||||||
|
|
||||||
// Player animation (panim_t)
|
// Player animation (panim_t)
|
||||||
{"PA_ETC",PA_ETC},
|
{"PA_ETC",PA_ETC},
|
||||||
{"PA_IDLE",PA_IDLE},
|
{"PA_STILL",PA_STILL},
|
||||||
{"PA_EDGE",PA_EDGE},
|
{"PA_SLOW",PA_SLOW},
|
||||||
{"PA_WALK",PA_WALK},
|
{"PA_FAST",PA_FAST},
|
||||||
{"PA_RUN",PA_RUN},
|
{"PA_DRIFT",PA_DRIFT},
|
||||||
{"PA_DASH",PA_DASH},
|
{"PA_HURT",PA_HURT},
|
||||||
{"PA_PAIN",PA_PAIN},
|
|
||||||
{"PA_ROLL",PA_ROLL},
|
|
||||||
{"PA_JUMP",PA_JUMP},
|
|
||||||
{"PA_SPRING",PA_SPRING},
|
|
||||||
{"PA_FALL",PA_FALL},
|
|
||||||
{"PA_ABILITY",PA_ABILITY},
|
|
||||||
{"PA_ABILITY2",PA_ABILITY2},
|
|
||||||
{"PA_RIDE",PA_RIDE},
|
|
||||||
|
|
||||||
// Value for infinite lives
|
// Value for infinite lives
|
||||||
{"INFLIVES",INFLIVES},
|
{"INFLIVES",INFLIVES},
|
||||||
|
|
|
||||||
|
|
@ -2261,7 +2261,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
p->pflags |= PF_JUMPDOWN;
|
p->pflags |= PF_JUMPDOWN;
|
||||||
|
|
||||||
p->playerstate = PST_LIVE;
|
p->playerstate = PST_LIVE;
|
||||||
p->panim = PA_IDLE; // standing animation
|
p->panim = PA_STILL; // standing animation
|
||||||
|
|
||||||
// Check to make sure their color didn't change somehow...
|
// Check to make sure their color didn't change somehow...
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
|
|
|
||||||
26
src/p_mobj.c
26
src/p_mobj.c
|
|
@ -221,17 +221,29 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
||||||
case S_KART_STILL:
|
case S_KART_STILL:
|
||||||
case S_KART_STILL_L:
|
case S_KART_STILL_L:
|
||||||
case S_KART_STILL_R:
|
case S_KART_STILL_R:
|
||||||
player->panim = PA_IDLE;
|
case S_KART_STILL_GLANCE_L:
|
||||||
|
case S_KART_STILL_GLANCE_R:
|
||||||
|
case S_KART_STILL_LOOK_L:
|
||||||
|
case S_KART_STILL_LOOK_R:
|
||||||
|
player->panim = PA_STILL;
|
||||||
break;
|
break;
|
||||||
case S_KART_SLOW:
|
case S_KART_SLOW:
|
||||||
case S_KART_SLOW_L:
|
case S_KART_SLOW_L:
|
||||||
case S_KART_SLOW_R:
|
case S_KART_SLOW_R:
|
||||||
player->panim = PA_WALK;
|
case S_KART_SLOW_GLANCE_L:
|
||||||
|
case S_KART_SLOW_GLANCE_R:
|
||||||
|
case S_KART_SLOW_LOOK_L:
|
||||||
|
case S_KART_SLOW_LOOK_R:
|
||||||
|
player->panim = PA_SLOW;
|
||||||
break;
|
break;
|
||||||
case S_KART_FAST:
|
case S_KART_FAST:
|
||||||
case S_KART_FAST_L:
|
case S_KART_FAST_L:
|
||||||
case S_KART_FAST_R:
|
case S_KART_FAST_R:
|
||||||
player->panim = PA_RUN;
|
case S_KART_FAST_GLANCE_L:
|
||||||
|
case S_KART_FAST_GLANCE_R:
|
||||||
|
case S_KART_FAST_LOOK_L:
|
||||||
|
case S_KART_FAST_LOOK_R:
|
||||||
|
player->panim = PA_FAST;
|
||||||
break;
|
break;
|
||||||
case S_KART_DRIFT_L:
|
case S_KART_DRIFT_L:
|
||||||
case S_KART_DRIFT_L_OUT:
|
case S_KART_DRIFT_L_OUT:
|
||||||
|
|
@ -239,11 +251,11 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
||||||
case S_KART_DRIFT_R:
|
case S_KART_DRIFT_R:
|
||||||
case S_KART_DRIFT_R_OUT:
|
case S_KART_DRIFT_R_OUT:
|
||||||
case S_KART_DRIFT_R_IN:
|
case S_KART_DRIFT_R_IN:
|
||||||
player->panim = PA_DASH;
|
player->panim = PA_DRIFT;
|
||||||
break;
|
break;
|
||||||
case S_KART_SPINOUT:
|
case S_KART_SPINOUT:
|
||||||
case S_KART_DEAD:
|
case S_KART_DEAD:
|
||||||
player->panim = PA_PAIN;
|
player->panim = PA_HURT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
player->panim = PA_ETC;
|
player->panim = PA_ETC;
|
||||||
|
|
@ -1300,7 +1312,7 @@ static void P_XYFriction(mobj_t *mo, fixed_t oldx, fixed_t oldy)
|
||||||
&& !(player->mo->standingslope && (!(player->mo->standingslope->flags & SL_NOPHYSICS)) /*&& (abs(player->mo->standingslope->zdelta) >= FRACUNIT/2)*/))
|
&& !(player->mo->standingslope && (!(player->mo->standingslope->flags & SL_NOPHYSICS)) /*&& (abs(player->mo->standingslope->zdelta) >= FRACUNIT/2)*/))
|
||||||
{
|
{
|
||||||
// if in a walking frame, stop moving
|
// if in a walking frame, stop moving
|
||||||
if (player->panim == PA_WALK)
|
if (player->panim == PA_SLOW)
|
||||||
{
|
{
|
||||||
P_SetPlayerMobjState(mo, S_KART_STILL);
|
P_SetPlayerMobjState(mo, S_KART_STILL);
|
||||||
}
|
}
|
||||||
|
|
@ -2695,7 +2707,7 @@ void P_PlayerZMovement(mobj_t *mo)
|
||||||
mo->z = mo->floorz;
|
mo->z = mo->floorz;
|
||||||
|
|
||||||
// Get up if you fell.
|
// Get up if you fell.
|
||||||
if (mo->player->panim == PA_PAIN && mo->player->kartstuff[k_spinouttimer] == 0 && mo->player->tumbleBounces == 0)
|
if (mo->player->panim == PA_HURT && mo->player->kartstuff[k_spinouttimer] == 0 && mo->player->tumbleBounces == 0)
|
||||||
P_SetPlayerMobjState(mo, S_KART_STILL);
|
P_SetPlayerMobjState(mo, S_KART_STILL);
|
||||||
|
|
||||||
if (!mo->standingslope && (mo->eflags & MFE_VERTICALFLIP ? tmceilingslope : tmfloorslope)) {
|
if (!mo->standingslope && (mo->eflags & MFE_VERTICALFLIP ? tmceilingslope : tmfloorslope)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue