Revert "Several changes to split jump anims from spin anims:"

This reverts commit 27b65e3569.
This commit is contained in:
Inuyasha 2016-01-14 04:57:17 -08:00
parent 24d1874fd6
commit cc0fbf1c1b
7 changed files with 35 additions and 58 deletions

View file

@ -166,7 +166,7 @@ typedef enum
PA_RUN,
PA_PAIN,
PA_ROLL,
PA_SPRING,
PA_JUMP,
PA_FALL,
PA_ABILITY,
PA_RIDE

View file

@ -3759,7 +3759,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAY_DASH",
"S_PLAY_GASP",
"S_PLAY_JUMP",
"S_PLAY_SPRING",
"S_PLAY_FALL",
"S_PLAY_EDGE",
"S_PLAY_RIDE",
@ -3784,7 +3783,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAY_SUPER_SPIN",
"S_PLAY_SUPER_GASP",
"S_PLAY_SUPER_JUMP",
"S_PLAY_SUPER_SPRING",
"S_PLAY_SUPER_FALL",
"S_PLAY_SUPER_EDGE",
"S_PLAY_SUPER_RIDE",
@ -7685,7 +7683,7 @@ struct {
{"PA_RUN",PA_RUN},
{"PA_PAIN",PA_PAIN},
{"PA_ROLL",PA_ROLL},
{"PA_SPRING",PA_SPRING},
{"PA_JUMP",PA_JUMP},
{"PA_FALL",PA_FALL},
{"PA_ABILITY",PA_ABILITY},
{"PA_RIDE",PA_RIDE},

View file

@ -69,7 +69,6 @@ char spr2names[NUMPLAYERSPRITES][5] =
"DASH",
"GASP",
"JUMP",
"SPNG",
"FALL",
"EDGE",
"RIDE",
@ -95,7 +94,6 @@ char spr2names[NUMPLAYERSPRITES][5] =
"SSPN",
"SGSP",
"SJMP",
"SSPG",
"SFAL",
"SEDG",
"SRID",
@ -137,8 +135,7 @@ state_t states[NUMSTATES] =
{SPR_PLAY, SPR2_SPIN, 1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
{SPR_PLAY, SPR2_DASH, 2, {NULL}, 0, 0, S_PLAY_DASH}, // S_PLAY_DASH
{SPR_PLAY, SPR2_GASP, 14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP
{SPR_PLAY, SPR2_JUMP, 1, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP
{SPR_PLAY, SPR2_SPNG, 2, {NULL}, 0, 0, S_PLAY_SPRING}, // S_PLAY_SPRING
{SPR_PLAY, SPR2_JUMP, 2, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP
{SPR_PLAY, SPR2_FALL, 2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL
{SPR_PLAY, SPR2_EDGE, 12, {NULL}, 0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE
{SPR_PLAY, SPR2_RIDE, 4, {NULL}, 0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE
@ -162,8 +159,7 @@ state_t states[NUMSTATES] =
{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
{SPR_PLAY, SPR2_SGSP, 14, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_GASP
{SPR_PLAY, SPR2_SJMP, 1, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP
{SPR_PLAY, SPR2_SSPG, 2, {NULL}, 0, 0, S_PLAY_SUPER_SPRING}, // S_PLAY_SUPER_SPRING
{SPR_PLAY, SPR2_SJMP, 2, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP
{SPR_PLAY, SPR2_SFAL, 2, {NULL}, 0, 0, S_PLAY_SUPER_FALL}, // S_PLAY_SUPER_FALL
{SPR_PLAY, SPR2_SEDG, 12, {NULL}, 0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE
{SPR_PLAY, SPR2_SRID, 4, {NULL}, 0, 0, S_PLAY_SUPER_RIDE}, // S_PLAY_SUPER_RIDE

View file

@ -588,7 +588,6 @@ enum playersprite
SPR2_DASH,
SPR2_GASP,
SPR2_JUMP,
SPR2_SPNG, // spring
SPR2_FALL,
SPR2_EDGE,
SPR2_RIDE,
@ -614,7 +613,6 @@ enum playersprite
SPR2_SSPN,
SPR2_SGSP,
SPR2_SJMP,
SPR2_SSPG,
SPR2_SFAL,
SPR2_SEDG,
SPR2_SRID,
@ -651,8 +649,7 @@ typedef enum state
S_PLAY_SPIN,
S_PLAY_DASH,
S_PLAY_GASP,
S_PLAY_JUMP, // spin jump (todo: make jump separate from spring up for non-spin chars too?)
S_PLAY_SPRING,
S_PLAY_JUMP,
S_PLAY_FALL,
S_PLAY_EDGE,
S_PLAY_RIDE,
@ -676,8 +673,7 @@ typedef enum state
S_PLAY_SUPER_DRWN,
S_PLAY_SUPER_SPIN,
S_PLAY_SUPER_GASP,
S_PLAY_SUPER_JUMP, // see note above
S_PLAY_SUPER_SPRING,
S_PLAY_SUPER_JUMP,
S_PLAY_SUPER_FALL,
S_PLAY_SUPER_EDGE,
S_PLAY_SUPER_RIDE,

View file

@ -199,7 +199,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
P_ResetPlayer(object->player);
if (P_MobjFlip(object)*vertispeed > 0)
P_SetPlayerMobjState(object, S_PLAY_SPRING);
P_SetPlayerMobjState(object, S_PLAY_JUMP);
else if (P_MobjFlip(object)*vertispeed < 0)
P_SetPlayerMobjState(object, S_PLAY_FALL);
else // horizontal spring
@ -213,7 +213,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
if (spring->info->painchance)
{
object->player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(object, S_PLAY_JUMP);
P_SetPlayerMobjState(object, S_PLAY_SPIN);
}
}
return true;
@ -1929,7 +1929,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
// Don't 'step up' while springing,
// Only step up "if needed".
if (thing->player->panim == PA_SPRING
if (thing->player->panim == PA_JUMP
&& P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale))
maxstep = 0;
}

View file

@ -163,11 +163,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
case S_PLAY_GASP:
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_GASP);
case S_PLAY_JUMP:
if (!(player->charflags & SF_SUPERSPIN))
return true;
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_JUMP);
case S_PLAY_SPRING:
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_SPRING);
case S_PLAY_FALL:
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_FALL);
case S_PLAY_EDGE:
@ -213,14 +209,12 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
break;
case S_PLAY_SPIN:
case S_PLAY_DASH:
case S_PLAY_JUMP:
case S_PLAY_SUPER_SPIN:
case S_PLAY_SUPER_JUMP:
player->panim = PA_ROLL;
break;
case S_PLAY_SPRING:
case S_PLAY_SUPER_SPRING:
player->panim = PA_SPRING;
case S_PLAY_JUMP:
case S_PLAY_SUPER_JUMP:
player->panim = PA_JUMP;
break;
case S_PLAY_FALL:
case S_PLAY_SUPER_FALL:
@ -323,12 +317,9 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
spr2 = SPR2_SPIN;
break;
case SPR2_GASP:
spr2 = SPR2_SPNG;
spr2 = SPR2_JUMP;
break;
case SPR2_JUMP:
spr2 = SPR2_SPIN;
break;
case SPR2_SPNG: // spring
spr2 = SPR2_FALL;
break;
case SPR2_FALL:
@ -339,7 +330,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
break;
case SPR2_FLY:
spr2 = SPR2_SPNG;
spr2 = SPR2_JUMP;
break;
case SPR2_TIRE:
spr2 = SPR2_FLY;
@ -388,9 +379,6 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
case SPR2_SJMP:
spr2 = SPR2_JUMP;
break;
case SPR2_SSPG:
spr2 = SPR2_SPNG;
break;
case SPR2_SFAL:
spr2 = SPR2_FALL;
break;

View file

@ -1598,7 +1598,7 @@ void P_DoPlayerExit(player_t *player)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
player->powers[pw_underwater] = 0;
player->powers[pw_spacetime] = 0;
@ -2666,21 +2666,21 @@ static void P_DoClimbing(player_t *player)
player->climbing = 0;
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
if (skyclimber)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
}
else
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
if (cmd->sidemove != 0 || cmd->forwardmove != 0)
@ -2698,7 +2698,7 @@ static void P_DoClimbing(player_t *player)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
}
@ -2709,7 +2709,7 @@ static void P_DoClimbing(player_t *player)
localangle2 = player->mo->angle;
if (player->climbing == 0)
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
if (player->climbing && P_IsObjectOnGround(player->mo))
{
@ -3497,9 +3497,8 @@ static void P_DoSuperStuff(player_t *player)
if (player->mo->health > 0)
{
if (player->pflags & PF_JUMPED)
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
else if (player->pflags & PF_SPINNING && player->mo->state-states != S_PLAY_DASH)
if ((player->pflags & PF_JUMPED || player->pflags & PF_SPINNING)
&& player->mo->state-states != S_PLAY_DASH)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
else switch (player->mo->state-states)
{
@ -3517,8 +3516,8 @@ static void P_DoSuperStuff(player_t *player)
case S_PLAY_SUPER_PAIN:
P_SetPlayerMobjState(player->mo, S_PLAY_PAIN);
break;
case S_PLAY_SUPER_SPRING:
P_SetPlayerMobjState(player->mo, S_PLAY_SPRING);
case S_PLAY_SUPER_JUMP:
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
break;
case S_PLAY_SUPER_FALL:
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
@ -3738,9 +3737,9 @@ void P_DoJump(player_t *player, boolean soundandstate)
S_StartSound(player->mo, sfx_jump); // Play jump sound!
if (!(player->charability2 == CA2_SPINDASH))
P_SetPlayerMobjState(player->mo, S_PLAY_SPRING);
else
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
else
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
}
@ -6517,10 +6516,10 @@ static void P_MovePlayer(player_t *player)
}
// If Springing, but travelling DOWNWARD, change back!
if (player->panim == PA_SPRING && P_MobjFlip(player->mo)*player->mo->momz < 0)
if (player->panim == PA_JUMP && P_MobjFlip(player->mo)*player->mo->momz < 0)
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
// If Springing but on the ground, change back!
else if (onground && (player->panim == PA_SPRING || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz)
else if (onground && (player->panim == PA_JUMP || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz)
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
// If you are stopped and are still walking, stand still!
@ -6559,7 +6558,7 @@ static void P_MovePlayer(player_t *player)
else
{
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
}
player->pflags &= ~PF_GLIDING;
@ -6617,7 +6616,7 @@ static void P_MovePlayer(player_t *player)
|| (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]) && player->charability == CA_GLIDEANDCLIMB))
{
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
else
{
@ -6687,7 +6686,7 @@ static void P_MovePlayer(player_t *player)
else
{
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
}
player->powers[pw_tailsfly] = 0;
@ -7267,7 +7266,7 @@ static void P_DoRopeHang(player_t *player)
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
&& !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
return;
}
@ -7384,7 +7383,7 @@ static void P_DoRopeHang(player_t *player)
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
&& !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
}
P_SetTarget(&player->mo->tracer, NULL);
@ -8700,7 +8699,7 @@ void P_PlayerThink(player_t *player)
P_SetPlayerMobjState(player->mo, S_PLAY_GLIDE);
}
else if ((player->pflags & PF_JUMPED) && !player->powers[pw_super] && player->panim != PA_ROLL && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
if (player->flashcount)
player->flashcount--;
@ -9328,7 +9327,7 @@ void P_PlayerAfterThink(player_t *player)
&& ((!player->powers[pw_super] && player->panim != PA_ROLL)
|| player->mo->state == &states[player->mo->info->painstate])
&& player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
if (player->pflags & PF_CARRIED && player->mo->tracer)
{