mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Add new player animations.
Added drowning to all players, and several new Super animations for Sonic. Removed A_Fall from S_PLAY_DEAD and moved its effect into P_KillMobj for player avatars.
This commit is contained in:
parent
91934d5aec
commit
ff181d099c
5 changed files with 97 additions and 43 deletions
|
@ -3747,6 +3747,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_PLAY_RUN",
|
"S_PLAY_RUN",
|
||||||
"S_PLAY_PAIN",
|
"S_PLAY_PAIN",
|
||||||
"S_PLAY_DEAD",
|
"S_PLAY_DEAD",
|
||||||
|
"S_PLAY_DRWN",
|
||||||
"S_PLAY_SPIN",
|
"S_PLAY_SPIN",
|
||||||
"S_PLAY_GASP",
|
"S_PLAY_GASP",
|
||||||
"S_PLAY_JUMP",
|
"S_PLAY_JUMP",
|
||||||
|
@ -3767,8 +3768,15 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_PLAY_SUPER_STND",
|
"S_PLAY_SUPER_STND",
|
||||||
"S_PLAY_SUPER_WALK",
|
"S_PLAY_SUPER_WALK",
|
||||||
"S_PLAY_SUPER_RUN",
|
"S_PLAY_SUPER_RUN",
|
||||||
"S_PLAY_SUPER_EDGE",
|
|
||||||
"S_PLAY_SUPER_PAIN",
|
"S_PLAY_SUPER_PAIN",
|
||||||
|
"S_PLAY_SUPER_DEAD",
|
||||||
|
"S_PLAY_SUPER_DRWN",
|
||||||
|
"S_PLAY_SUPER_SPIN",
|
||||||
|
"S_PLAY_SUPER_GASP",
|
||||||
|
"S_PLAY_SUPER_JUMP",
|
||||||
|
"S_PLAY_SUPER_FALL",
|
||||||
|
"S_PLAY_SUPER_EDGE",
|
||||||
|
"S_PLAY_SUPER_RIDE",
|
||||||
|
|
||||||
// SF_SUPER
|
// SF_SUPER
|
||||||
"S_PLAY_SUPERTRANS1",
|
"S_PLAY_SUPERTRANS1",
|
||||||
|
|
70
src/info.c
70
src/info.c
|
@ -64,6 +64,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
|
||||||
"RUN_",
|
"RUN_",
|
||||||
"PAIN",
|
"PAIN",
|
||||||
"DEAD",
|
"DEAD",
|
||||||
|
"DRWN",
|
||||||
"SPIN",
|
"SPIN",
|
||||||
"GASP",
|
"GASP",
|
||||||
"JUMP",
|
"JUMP",
|
||||||
|
@ -85,8 +86,15 @@ char spr2names[NUMPLAYERSPRITES][5] =
|
||||||
"SSTD",
|
"SSTD",
|
||||||
"SWLK",
|
"SWLK",
|
||||||
"SRUN",
|
"SRUN",
|
||||||
|
"SPAN",
|
||||||
|
"SDTH",
|
||||||
|
"SDRN",
|
||||||
|
"SSPN",
|
||||||
|
"SGSP",
|
||||||
|
"SJMP",
|
||||||
|
"SFAL",
|
||||||
"SEDG",
|
"SEDG",
|
||||||
"SHIT"
|
"SRID"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||||
|
@ -114,32 +122,44 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_THOK, FF_TRANS50, 8, {NULL}, 0, 0, S_NULL}, // S_THOK
|
{SPR_THOK, FF_TRANS50, 8, {NULL}, 0, 0, S_NULL}, // S_THOK
|
||||||
|
|
||||||
// Player
|
// Player
|
||||||
{SPR_PLAY, SPR2_STND, 105, {NULL}, 0, 0, S_PLAY_WAIT}, // S_PLAY_STND
|
{SPR_PLAY, SPR2_STND, 105, {NULL}, 0, 0, S_PLAY_WAIT}, // S_PLAY_STND
|
||||||
{SPR_PLAY, SPR2_WAIT, 16, {NULL}, 0, 0, S_PLAY_WAIT}, // S_PLAY_WAIT
|
{SPR_PLAY, SPR2_WAIT, 16, {NULL}, 0, 0, S_PLAY_WAIT}, // S_PLAY_WAIT
|
||||||
{SPR_PLAY, SPR2_WALK, 4, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_WALK
|
{SPR_PLAY, SPR2_WALK, 4, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_WALK
|
||||||
{SPR_PLAY, SPR2_RUN , 2, {NULL}, 0, 0, S_PLAY_RUN}, // S_PLAY_RUN
|
{SPR_PLAY, SPR2_RUN , 2, {NULL}, 0, 0, S_PLAY_RUN}, // S_PLAY_RUN
|
||||||
{SPR_PLAY, SPR2_PAIN, 350, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_PAIN
|
{SPR_PLAY, SPR2_PAIN, 350, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_PAIN
|
||||||
{SPR_PLAY, SPR2_DEAD, 4, {A_Fall}, 0, 0, S_PLAY_DEAD}, // S_PLAY_DEAD
|
{SPR_PLAY, SPR2_DEAD, 4, {NULL}, 0, 0, S_PLAY_DEAD}, // S_PLAY_DEAD
|
||||||
{SPR_PLAY, SPR2_SPIN, 1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
|
{SPR_PLAY, SPR2_DRWN, 4, {NULL}, 0, 0, S_PLAY_DRWN}, // S_PLAY_DRWN
|
||||||
{SPR_PLAY, SPR2_GASP, 14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP
|
{SPR_PLAY, SPR2_SPIN, 1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
|
||||||
{SPR_PLAY, SPR2_JUMP, -1, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_JUMP
|
{SPR_PLAY, SPR2_GASP, 14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP
|
||||||
{SPR_PLAY, SPR2_FALL, 2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL
|
{SPR_PLAY, SPR2_JUMP, -1, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_JUMP
|
||||||
{SPR_PLAY, SPR2_EDGE, 12, {NULL}, 0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE
|
{SPR_PLAY, SPR2_FALL, 2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL
|
||||||
{SPR_PLAY, SPR2_RIDE, 4, {NULL}, 0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE
|
{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
|
||||||
|
|
||||||
{SPR_PLAY, SPR2_FLY , 2, {NULL}, 0, 0, S_PLAY_FLY}, // S_PLAY_FLY
|
// Tails abilities
|
||||||
{SPR_PLAY, SPR2_TIRE, 12, {NULL}, 0, 0, S_PLAY_FLY_TIRED}, // S_PLAY_FLY_TIRED
|
{SPR_PLAY, SPR2_FLY , 2, {NULL}, 0, 0, S_PLAY_FLY}, // S_PLAY_FLY
|
||||||
|
{SPR_PLAY, SPR2_TIRE, 12, {NULL}, 0, 0, S_PLAY_FLY_TIRED}, // S_PLAY_FLY_TIRED
|
||||||
|
|
||||||
{SPR_PLAY, SPR2_GLID, 2, {NULL}, 0, 0, S_PLAY_GLIDE}, // S_PLAY_GLIDE
|
// Knuckles abilities
|
||||||
{SPR_PLAY, SPR2_CLNG, 6, {NULL}, 0, 0, S_PLAY_CLING}, // S_PLAY_CLING
|
{SPR_PLAY, SPR2_GLID, 2, {NULL}, 0, 0, S_PLAY_GLIDE}, // S_PLAY_GLIDE
|
||||||
{SPR_PLAY, SPR2_CLMB, 5, {NULL}, 0, 0, S_PLAY_CLIMB}, // S_PLAY_CLIMB
|
{SPR_PLAY, SPR2_CLNG, 6, {NULL}, 0, 0, S_PLAY_CLING}, // S_PLAY_CLING
|
||||||
|
{SPR_PLAY, SPR2_CLMB, 5, {NULL}, 0, 0, S_PLAY_CLIMB}, // S_PLAY_CLIMB
|
||||||
|
|
||||||
{SPR_PLAY, SPR2_SSTD, 7, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_STND
|
// Super Sonic
|
||||||
{SPR_PLAY, SPR2_SWLK, 7, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_WALK
|
{SPR_PLAY, SPR2_SSTD, 7, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_STND
|
||||||
{SPR_PLAY, SPR2_SRUN, 7, {NULL}, 0, 0, S_PLAY_SUPER_RUN}, // S_PLAY_SUPER_RUN
|
{SPR_PLAY, SPR2_SWLK, 7, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_WALK
|
||||||
{SPR_PLAY, SPR2_SEDG, 12, {NULL}, 0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE
|
{SPR_PLAY, SPR2_SRUN, 7, {NULL}, 0, 0, S_PLAY_SUPER_RUN}, // S_PLAY_SUPER_RUN
|
||||||
{SPR_PLAY, SPR2_SHIT, -1, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_PAIN
|
{SPR_PLAY, SPR2_SPAN, -1, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_PAIN
|
||||||
|
{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
|
||||||
|
{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_FALL}, // 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
|
||||||
|
|
||||||
|
// Transforming into Super
|
||||||
{SPR_PLAY, SPR2_TRNS, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS2}, // S_PLAY_SUPER_TRANS
|
{SPR_PLAY, SPR2_TRNS, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS2}, // S_PLAY_SUPER_TRANS
|
||||||
{SPR_PLAY, SPR2_TRNS, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3}, // S_PLAY_SUPER_TRANS2
|
{SPR_PLAY, SPR2_TRNS, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3}, // S_PLAY_SUPER_TRANS2
|
||||||
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4}, // S_PLAY_SUPER_TRANS3
|
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4}, // S_PLAY_SUPER_TRANS3
|
||||||
|
@ -3130,8 +3150,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
sfx_None, // painsound
|
sfx_None, // painsound
|
||||||
S_NULL, // meleestate
|
S_NULL, // meleestate
|
||||||
S_PLAY_SPIN, // missilestate
|
S_PLAY_SPIN, // missilestate
|
||||||
S_PLAY_DEAD, // deathstate
|
S_PLAY_DEAD, // deathstate
|
||||||
S_NULL, // xdeathstate
|
S_PLAY_DRWN, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_None, // deathsound
|
||||||
1, // speed
|
1, // speed
|
||||||
16*FRACUNIT, // radius
|
16*FRACUNIT, // radius
|
||||||
|
|
20
src/info.h
20
src/info.h
|
@ -583,6 +583,7 @@ enum playersprite
|
||||||
SPR2_RUN ,
|
SPR2_RUN ,
|
||||||
SPR2_PAIN,
|
SPR2_PAIN,
|
||||||
SPR2_DEAD,
|
SPR2_DEAD,
|
||||||
|
SPR2_DRWN,
|
||||||
SPR2_SPIN,
|
SPR2_SPIN,
|
||||||
SPR2_GASP,
|
SPR2_GASP,
|
||||||
SPR2_JUMP,
|
SPR2_JUMP,
|
||||||
|
@ -604,8 +605,15 @@ enum playersprite
|
||||||
SPR2_SSTD,
|
SPR2_SSTD,
|
||||||
SPR2_SWLK,
|
SPR2_SWLK,
|
||||||
SPR2_SRUN,
|
SPR2_SRUN,
|
||||||
|
SPR2_SPAN,
|
||||||
|
SPR2_SDTH,
|
||||||
|
SPR2_SDRN,
|
||||||
|
SPR2_SSPN,
|
||||||
|
SPR2_SGSP,
|
||||||
|
SPR2_SJMP,
|
||||||
|
SPR2_SFAL,
|
||||||
SPR2_SEDG,
|
SPR2_SEDG,
|
||||||
SPR2_SHIT,
|
SPR2_SRID,
|
||||||
|
|
||||||
NUMPLAYERSPRITES
|
NUMPLAYERSPRITES
|
||||||
};
|
};
|
||||||
|
@ -634,6 +642,7 @@ typedef enum state
|
||||||
S_PLAY_RUN,
|
S_PLAY_RUN,
|
||||||
S_PLAY_PAIN,
|
S_PLAY_PAIN,
|
||||||
S_PLAY_DEAD,
|
S_PLAY_DEAD,
|
||||||
|
S_PLAY_DRWN,
|
||||||
S_PLAY_SPIN,
|
S_PLAY_SPIN,
|
||||||
S_PLAY_GASP,
|
S_PLAY_GASP,
|
||||||
S_PLAY_JUMP,
|
S_PLAY_JUMP,
|
||||||
|
@ -654,8 +663,15 @@ typedef enum state
|
||||||
S_PLAY_SUPER_STND,
|
S_PLAY_SUPER_STND,
|
||||||
S_PLAY_SUPER_WALK,
|
S_PLAY_SUPER_WALK,
|
||||||
S_PLAY_SUPER_RUN,
|
S_PLAY_SUPER_RUN,
|
||||||
S_PLAY_SUPER_EDGE,
|
|
||||||
S_PLAY_SUPER_PAIN,
|
S_PLAY_SUPER_PAIN,
|
||||||
|
S_PLAY_SUPER_DEAD,
|
||||||
|
S_PLAY_SUPER_DRWN,
|
||||||
|
S_PLAY_SUPER_SPIN,
|
||||||
|
S_PLAY_SUPER_GASP,
|
||||||
|
S_PLAY_SUPER_JUMP,
|
||||||
|
S_PLAY_SUPER_FALL,
|
||||||
|
S_PLAY_SUPER_EDGE,
|
||||||
|
S_PLAY_SUPER_RIDE,
|
||||||
|
|
||||||
// SF_SUPER
|
// SF_SUPER
|
||||||
S_PLAY_SUPER_TRANS,
|
S_PLAY_SUPER_TRANS,
|
||||||
|
|
|
@ -1953,7 +1953,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
{
|
{
|
||||||
target->flags &= ~(MF_SOLID|MF_SHOOTABLE); // does not block
|
target->flags &= ~(MF_SOLID|MF_SHOOTABLE); // does not block
|
||||||
P_UnsetThingPosition(target);
|
P_UnsetThingPosition(target);
|
||||||
target->flags |= MF_NOBLOCKMAP;
|
target->flags |= MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY;
|
||||||
P_SetThingPosition(target);
|
P_SetThingPosition(target);
|
||||||
|
|
||||||
if (!target->player->bot && !G_IsSpecialStage(gamemap)
|
if (!target->player->bot && !G_IsSpecialStage(gamemap)
|
||||||
|
@ -2289,7 +2289,12 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (target->player)
|
else if (target->player)
|
||||||
P_SetPlayerMobjState(target, target->info->deathstate);
|
{
|
||||||
|
if (damagetype == DMG_DROWNED || damagetype == DMG_SPACEDROWN)
|
||||||
|
P_SetPlayerMobjState(target, target->info->xdeathstate);
|
||||||
|
else
|
||||||
|
P_SetPlayerMobjState(target, target->info->deathstate);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#ifdef DEBUG_NULL_DEATHSTATE
|
#ifdef DEBUG_NULL_DEATHSTATE
|
||||||
P_SetMobjState(target, S_NULL);
|
P_SetMobjState(target, S_NULL);
|
||||||
|
|
31
src/p_mobj.c
31
src/p_mobj.c
|
@ -142,24 +142,29 @@ 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_GASP:
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_STND);
|
||||||
P_SetPlayerMobjState(mobj, S_PLAY_SUPER_STND);
|
|
||||||
return true;
|
|
||||||
case S_PLAY_FALL:
|
|
||||||
case S_PLAY_JUMP:
|
|
||||||
case S_PLAY_WALK:
|
case S_PLAY_WALK:
|
||||||
P_SetPlayerMobjState(mobj, S_PLAY_SUPER_WALK);
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_WALK);
|
||||||
return true;
|
|
||||||
case S_PLAY_RUN:
|
case S_PLAY_RUN:
|
||||||
P_SetPlayerMobjState(mobj, S_PLAY_SUPER_RUN);
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_RUN);
|
||||||
return true;
|
case S_PLAY_PAIN:
|
||||||
case S_PLAY_EDGE:
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_PAIN);
|
||||||
P_SetPlayerMobjState(mobj, S_PLAY_SUPER_EDGE);
|
case S_PLAY_DEAD:
|
||||||
return true;
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_DEAD);
|
||||||
|
case S_PLAY_DRWN:
|
||||||
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_DRWN);
|
||||||
case S_PLAY_SPIN:
|
case S_PLAY_SPIN:
|
||||||
if (!(player->charflags & SF_SUPERSPIN))
|
if (!(player->charflags & SF_SUPERSPIN))
|
||||||
return true;
|
return true;
|
||||||
break;
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_SPIN);
|
||||||
|
case S_PLAY_GASP:
|
||||||
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_GASP);
|
||||||
|
case S_PLAY_JUMP:
|
||||||
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_JUMP);
|
||||||
|
case S_PLAY_FALL:
|
||||||
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_FALL);
|
||||||
|
case S_PLAY_EDGE:
|
||||||
|
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_EDGE);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue