* Remove the 22(!!) NiGHTS sprite2s that no longer get used in ROTSPRITE builds (which should be our main builds going forward).

* Rename `SPR2_NGT0` to `SPR2_NFLY`, and `SPR2_DRL0` to `SPR2_NDRL` to account for this. (requires modifying player.dta)
This commit is contained in:
toaster 2019-11-14 16:37:03 +00:00
parent 10d1b63ff2
commit afe28b0a0a
6 changed files with 35 additions and 189 deletions

View File

@ -791,7 +791,7 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].mo->scalespeed = LONG(rsp->scalespeed);
// And finally, SET THE MOBJ SKIN damn it.
if ((players[i].powers[pw_carry] == CR_NIGHTSMODE) && (skins[players[i].skin].sprites[SPR2_NGT0].numframes == 0))
if ((players[i].powers[pw_carry] == CR_NIGHTSMODE) && (skins[players[i].skin].sprites[SPR2_NFLY].numframes == 0))
{
players[i].mo->skin = &skins[DEFAULTNIGHTSSKIN];
players[i].mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor; // this will be corrected by thinker to super flash

View File

@ -4633,40 +4633,14 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAY_NIGHTS_TRANS4",
"S_PLAY_NIGHTS_TRANS5",
"S_PLAY_NIGHTS_TRANS6",
"S_PLAY_NIGHTS_STAND",
"S_PLAY_NIGHTS_FLOAT",
"S_PLAY_NIGHTS_FLY",
"S_PLAY_NIGHTS_DRILL",
"S_PLAY_NIGHTS_STUN",
"S_PLAY_NIGHTS_PULL",
"S_PLAY_NIGHTS_ATTACK",
"S_PLAY_NIGHTS_FLY0",
"S_PLAY_NIGHTS_DRILL0",
"S_PLAY_NIGHTS_FLY1",
"S_PLAY_NIGHTS_DRILL1",
"S_PLAY_NIGHTS_FLY2",
"S_PLAY_NIGHTS_DRILL2",
"S_PLAY_NIGHTS_FLY3",
"S_PLAY_NIGHTS_DRILL3",
"S_PLAY_NIGHTS_FLY4",
"S_PLAY_NIGHTS_DRILL4",
"S_PLAY_NIGHTS_FLY5",
"S_PLAY_NIGHTS_DRILL5",
"S_PLAY_NIGHTS_FLY6",
"S_PLAY_NIGHTS_DRILL6",
"S_PLAY_NIGHTS_FLY7",
"S_PLAY_NIGHTS_DRILL7",
"S_PLAY_NIGHTS_FLY8",
"S_PLAY_NIGHTS_DRILL8",
"S_PLAY_NIGHTS_FLY9",
"S_PLAY_NIGHTS_DRILL9",
"S_PLAY_NIGHTS_FLYA",
"S_PLAY_NIGHTS_DRILLA",
"S_PLAY_NIGHTS_FLYB",
"S_PLAY_NIGHTS_DRILLB",
"S_PLAY_NIGHTS_FLYC",
"S_PLAY_NIGHTS_DRILLC",
// c:
"S_TAILSOVERLAY_STAND",
"S_TAILSOVERLAY_0DEGREES",

View File

@ -553,38 +553,12 @@ char spr2names[NUMPLAYERSPRITES][5] =
"NSTD",
"NFLT",
"NFLY",
"NDRL",
"NSTN",
"NPUL",
"NATK",
"NGT0",
"NGT1",
"NGT2",
"NGT3",
"NGT4",
"NGT5",
"NGT6",
"NGT7",
"NGT8",
"NGT9",
"NGTA",
"NGTB",
"NGTC",
"DRL0",
"DRL1",
"DRL2",
"DRL3",
"DRL4",
"DRL5",
"DRL6",
"DRL7",
"DRL8",
"DRL9",
"DRLA",
"DRLB",
"DRLC",
"TAL0",
"TAL1",
"TAL2",
@ -656,38 +630,12 @@ playersprite_t spr2defaults[NUMPLAYERSPRITES] = {
FF_SPR2SUPER|SPR2_STND, // SPR2_NSTD,
FF_SPR2SUPER|SPR2_FLT , // SPR2_NFLT,
0, // SPR2_NFLY, (will never be referenced unless skin 0 lacks this)
SPR2_NFLY, // SPR2_NDRL,
FF_SPR2SUPER|SPR2_STUN, // SPR2_NSTN,
SPR2_NSTN, // SPR2_NPUL,
FF_SPR2SUPER|SPR2_ROLL, // SPR2_NATK,
0, // SPR2_NGT0, (will never be referenced unless skin 0 lacks this)
SPR2_NGT0, // SPR2_NGT1,
SPR2_NGT1, // SPR2_NGT2,
SPR2_NGT2, // SPR2_NGT3,
SPR2_NGT3, // SPR2_NGT4,
SPR2_NGT4, // SPR2_NGT5,
SPR2_NGT5, // SPR2_NGT6,
SPR2_NGT0, // SPR2_NGT7,
SPR2_NGT7, // SPR2_NGT8,
SPR2_NGT8, // SPR2_NGT9,
SPR2_NGT9, // SPR2_NGTA,
SPR2_NGTA, // SPR2_NGTB,
SPR2_NGTB, // SPR2_NGTC,
SPR2_NGT0, // SPR2_DRL0,
SPR2_NGT1, // SPR2_DRL1,
SPR2_NGT2, // SPR2_DRL2,
SPR2_NGT3, // SPR2_DRL3,
SPR2_NGT4, // SPR2_DRL4,
SPR2_NGT5, // SPR2_DRL5,
SPR2_NGT6, // SPR2_DRL6,
SPR2_NGT7, // SPR2_DRL7,
SPR2_NGT8, // SPR2_DRL8,
SPR2_NGT9, // SPR2_DRL9,
SPR2_NGTA, // SPR2_DRLA,
SPR2_NGTB, // SPR2_DRLB,
SPR2_NGTC, // SPR2_DRLC,
0, // SPR2_TAL0, (this will look mighty stupid but oh well)
SPR2_TAL0, // SPR2_TAL1,
SPR2_TAL1, // SPR2_TAL2,
@ -818,41 +766,15 @@ state_t states[NUMSTATES] =
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_TRANS6}, // S_PLAY_NIGHTS_TRANS5
{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT, 21, {A_FadeOverlay}, 2, 0, S_PLAY_NIGHTS_FLOAT}, // S_PLAY_NIGHTS_TRANS5
// NiGHTS Player, stand, float, pain, pull and attack
// NiGHTS Player
{SPR_PLAY, SPR2_NSTD, 7, {NULL}, 0, 0, S_PLAY_NIGHTS_STAND}, // S_PLAY_NIGHTS_STAND
{SPR_PLAY, SPR2_NFLT, 7, {NULL}, 0, 0, S_PLAY_NIGHTS_FLOAT}, // S_PLAY_NIGHTS_FLOAT
{SPR_PLAY, SPR2_NFLY, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY}, // S_PLAY_NIGHTS_FLY
{SPR_PLAY, SPR2_NDRL, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL}, // S_PLAY_NIGHTS_DRILL
{SPR_PLAY, SPR2_NSTN, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_STUN}, // S_PLAY_NIGHTS_STUN
{SPR_PLAY, SPR2_NPUL, 1, {NULL}, 0, 0, S_PLAY_NIGHTS_PULL}, // S_PLAY_NIGHTS_PULL
{SPR_PLAY, SPR2_NATK, 1, {NULL}, 0, 0, S_PLAY_NIGHTS_ATTACK}, // S_PLAY_NIGHTS_ATTACK
// NiGHTS Player, flying and drilling
{SPR_PLAY, SPR2_NGT0, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY0}, // S_PLAY_NIGHTS_FLY0
{SPR_PLAY, SPR2_DRL0, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL0}, // S_PLAY_NIGHTS_DRILL0
{SPR_PLAY, SPR2_NGT1, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY1}, // S_PLAY_NIGHTS_FLY1
{SPR_PLAY, SPR2_DRL1, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL1}, // S_PLAY_NIGHTS_DRILL1
{SPR_PLAY, SPR2_NGT2, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY2}, // S_PLAY_NIGHTS_FLY2
{SPR_PLAY, SPR2_DRL2, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL2}, // S_PLAY_NIGHTS_DRILL2
{SPR_PLAY, SPR2_NGT3, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY3}, // S_PLAY_NIGHTS_FLY3
{SPR_PLAY, SPR2_DRL3, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL3}, // S_PLAY_NIGHTS_DRILL3
{SPR_PLAY, SPR2_NGT4, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY4}, // S_PLAY_NIGHTS_FLY4
{SPR_PLAY, SPR2_DRL4, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL4}, // S_PLAY_NIGHTS_DRILL4
{SPR_PLAY, SPR2_NGT5, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY5}, // S_PLAY_NIGHTS_FLY5
{SPR_PLAY, SPR2_DRL5, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL5}, // S_PLAY_NIGHTS_DRILL5
{SPR_PLAY, SPR2_NGT6, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY6}, // S_PLAY_NIGHTS_FLY6
{SPR_PLAY, SPR2_DRL6, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL6}, // S_PLAY_NIGHTS_DRILL6
{SPR_PLAY, SPR2_NGT7, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY7}, // S_PLAY_NIGHTS_FLY7
{SPR_PLAY, SPR2_DRL7, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL7}, // S_PLAY_NIGHTS_DRILL7
{SPR_PLAY, SPR2_NGT8, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY8}, // S_PLAY_NIGHTS_FLY8
{SPR_PLAY, SPR2_DRL8, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL8}, // S_PLAY_NIGHTS_DRILL8
{SPR_PLAY, SPR2_NGT9, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLY9}, // S_PLAY_NIGHTS_FLY9
{SPR_PLAY, SPR2_DRL9, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILL9}, // S_PLAY_NIGHTS_DRILL9
{SPR_PLAY, SPR2_NGTA, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLYA}, // S_PLAY_NIGHTS_FLYA
{SPR_PLAY, SPR2_DRLA, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILLA}, // S_PLAY_NIGHTS_DRILLA
{SPR_PLAY, SPR2_NGTB, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLYB}, // S_PLAY_NIGHTS_FLYB
{SPR_PLAY, SPR2_DRLB, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILLB}, // S_PLAY_NIGHTS_DRILLB
{SPR_PLAY, SPR2_NGTC, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_FLYC}, // S_PLAY_NIGHTS_FLYC
{SPR_PLAY, SPR2_DRLC, 2, {NULL}, 0, 0, S_PLAY_NIGHTS_DRILLC}, // S_PLAY_NIGHTS_DRILLC
// c:
{SPR_PLAY, SPR2_TAL0|FF_SPR2MIDSTART, 5, {NULL}, 0, 0, S_TAILSOVERLAY_STAND}, // S_TAILSOVERLAY_STAND
{SPR_PLAY, SPR2_TAL1|FF_SPR2MIDSTART, 35, {NULL}, 0, 0, S_TAILSOVERLAY_0DEGREES}, // S_TAILSOVERLAY_0DEGREES

View File

@ -822,40 +822,12 @@ typedef enum playersprite
SPR2_NSTD, // NiGHTS stand
SPR2_NFLT, // NiGHTS float
SPR2_NFLY, // NiGHTS fly
SPR2_NDRL, // NiGHTS drill
SPR2_NSTN, // NiGHTS stun
SPR2_NPUL, // NiGHTS pull
SPR2_NATK, // NiGHTS attack
// NiGHTS flight
SPR2_NGT0,
SPR2_NGT1,
SPR2_NGT2,
SPR2_NGT3,
SPR2_NGT4,
SPR2_NGT5,
SPR2_NGT6,
SPR2_NGT7,
SPR2_NGT8,
SPR2_NGT9,
SPR2_NGTA,
SPR2_NGTB,
SPR2_NGTC,
// NiGHTS drill
SPR2_DRL0,
SPR2_DRL1,
SPR2_DRL2,
SPR2_DRL3,
SPR2_DRL4,
SPR2_DRL5,
SPR2_DRL6,
SPR2_DRL7,
SPR2_DRL8,
SPR2_DRL9,
SPR2_DRLA,
SPR2_DRLB,
SPR2_DRLC,
// c:
SPR2_TAL0,
SPR2_TAL1,
@ -989,40 +961,14 @@ typedef enum state
S_PLAY_NIGHTS_TRANS4,
S_PLAY_NIGHTS_TRANS5,
S_PLAY_NIGHTS_TRANS6,
S_PLAY_NIGHTS_STAND,
S_PLAY_NIGHTS_FLOAT,
S_PLAY_NIGHTS_FLY,
S_PLAY_NIGHTS_DRILL,
S_PLAY_NIGHTS_STUN,
S_PLAY_NIGHTS_PULL,
S_PLAY_NIGHTS_ATTACK,
S_PLAY_NIGHTS_FLY0,
S_PLAY_NIGHTS_DRILL0,
S_PLAY_NIGHTS_FLY1,
S_PLAY_NIGHTS_DRILL1,
S_PLAY_NIGHTS_FLY2,
S_PLAY_NIGHTS_DRILL2,
S_PLAY_NIGHTS_FLY3,
S_PLAY_NIGHTS_DRILL3,
S_PLAY_NIGHTS_FLY4,
S_PLAY_NIGHTS_DRILL4,
S_PLAY_NIGHTS_FLY5,
S_PLAY_NIGHTS_DRILL5,
S_PLAY_NIGHTS_FLY6,
S_PLAY_NIGHTS_DRILL6,
S_PLAY_NIGHTS_FLY7,
S_PLAY_NIGHTS_DRILL7,
S_PLAY_NIGHTS_FLY8,
S_PLAY_NIGHTS_DRILL8,
S_PLAY_NIGHTS_FLY9,
S_PLAY_NIGHTS_DRILL9,
S_PLAY_NIGHTS_FLYA,
S_PLAY_NIGHTS_DRILLA,
S_PLAY_NIGHTS_FLYB,
S_PLAY_NIGHTS_DRILLB,
S_PLAY_NIGHTS_FLYC,
S_PLAY_NIGHTS_DRILLC,
// c:
S_TAILSOVERLAY_STAND,
S_TAILSOVERLAY_0DEGREES,

View File

@ -744,7 +744,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
player->mo->height = P_GetPlayerHeight(player); // Just to make sure jumping into the drone doesn't result in a squashed hitbox.
player->oldscale = player->mo->scale;
if (skins[player->skin].sprites[SPR2_NGT0].numframes == 0) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
if (skins[player->skin].sprites[SPR2_NFLY].numframes == 0) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
{
player->mo->skin = &skins[DEFAULTNIGHTSSKIN];
if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback))
@ -7217,17 +7217,25 @@ static void P_NiGHTSMovement(player_t *player)
{
player->mo->momx = player->mo->momy = 0;
if (gametype != GT_RACE && gametype != GT_COMPETITION)
if (gametype != GT_RACE && gametype != GT_COMPETITION && P_MobjFlip(player->mo)*player->mo->momz >= 0)
P_SetObjectMomZ(player->mo, FRACUNIT/2, true);
else
player->mo->momz = 0;
#ifdef ROTSPRITE
if (player->mo->state != &states[S_PLAY_NIGHTS_DRILL0])
P_SetPlayerMobjState(player->mo, S_PLAY_NIGHTS_DRILL0);
player->mo->rollangle = ANGLE_90;
#else
if (player->mo->state != &states[S_PLAY_NIGHTS_DRILL6])
P_SetPlayerMobjState(player->mo, S_PLAY_NIGHTS_DRILL6);
if ((player->charflags & SF_NONIGHTSROTATION) && player->mo->momz)
{
if (player->mo->state != &states[S_PLAY_NIGHTS_DRILL])
P_SetPlayerMobjState(player->mo, S_PLAY_NIGHTS_DRILL);
player->mo->rollangle = ANGLE_90;
}
else
#endif
{
if (player->mo->state != &states[S_PLAY_NIGHTS_FLOAT])
P_SetPlayerMobjState(player->mo, S_PLAY_NIGHTS_FLOAT);
player->drawangle += ANGLE_22h;
}
player->mo->flags |= MF_NOCLIPHEIGHT;
return;
@ -7504,8 +7512,10 @@ static void P_NiGHTSMovement(player_t *player)
flystate = (P_IsObjectOnGround(player->mo)) ? S_PLAY_NIGHTS_STAND : S_PLAY_NIGHTS_FLOAT;
else
{
flystate = (player->pflags & PF_DRILLING) ? S_PLAY_NIGHTS_DRILL : S_PLAY_NIGHTS_FLY;
if (player->charflags & SF_NONIGHTSROTATION)
{
#if 0
visangle = ((player->anotherflyangle + 7) % 360)/15;
if (visangle > 18) // Over 270 degrees.
visangle = 30 - visangle;
@ -7522,10 +7532,8 @@ static void P_NiGHTSMovement(player_t *player)
visangle += 6; // shift to S_PLAY_NIGHTS_FLY7-C
}
flystate = S_PLAY_NIGHTS_FLY0 + (visangle*2); // S_PLAY_NIGHTS_FLY0-C - the *2 is to skip over drill states
if (player->pflags & PF_DRILLING)
flystate++; // shift to S_PLAY_NIGHTS_DRILL0-C
flystate += (visangle*2); // S_PLAY_NIGHTS_FLY0-C - the *2 is to skip over drill states
#endif
}
#ifdef ROTSPRITE
else
@ -7533,10 +7541,6 @@ static void P_NiGHTSMovement(player_t *player)
angle_t a = R_PointToAngle(player->mo->x, player->mo->y) - player->mo->angle;
visangle = (player->flyangle % 360);
flystate = S_PLAY_NIGHTS_FLY0;
if (player->pflags & PF_DRILLING)
flystate++; // shift to S_PLAY_NIGHTS_DRILL0-C
if (player->flyangle >= 90 && player->flyangle <= 270)
{
if (player->flyangle == 270 && (a < ANGLE_180))

View File

@ -2892,7 +2892,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
if (player->mo)
{
fixed_t radius = FixedMul(skin->radius, player->mo->scale);
if ((player->powers[pw_carry] == CR_NIGHTSMODE) && (skin->sprites[SPR2_NGT0].numframes == 0)) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
if ((player->powers[pw_carry] == CR_NIGHTSMODE) && (skin->sprites[SPR2_NFLY].numframes == 0)) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
{
skin = &skins[DEFAULTNIGHTSSKIN];
player->followitem = skin->followitem;