mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 06:13:18 +00:00
Increased space in pflags (because we were getting VERY close to full capacity), which I will re-organise when this branch is closer to completion.
* PF_NIGHTSMODE is now CR_NIGHTSMODE as part of player->powers[pw_carry]. This is because it's mutually exclusive to every other "carry" type. * PF_SUPERREADY is dead because it literally just checked for all 7 emeralds and 50 rings. That's it. You couldn't even appreciably alter its presence with Lua. That logic has been placed back in P_SuperReady.
This commit is contained in:
parent
b9ddc0226e
commit
7aeeb278fe
16 changed files with 131 additions and 127 deletions
|
@ -212,7 +212,7 @@ boolean B_CheckRespawn(player_t *player)
|
|||
|
||||
// Check if Sonic is busy first.
|
||||
// If he's doing any of these things, he probably doesn't want to see us.
|
||||
if (sonic->player->pflags & (PF_GLIDING|PF_SLIDING|PF_BOUNCING|PF_NIGHTSMODE)
|
||||
if (sonic->player->pflags & (PF_GLIDING|PF_SLIDING|PF_BOUNCING)
|
||||
|| (sonic->player->panim != PA_IDLE && sonic->player->panim != PA_WALK)
|
||||
|| (sonic->player->powers[pw_carry]))
|
||||
return false;
|
||||
|
|
|
@ -118,8 +118,7 @@ typedef enum
|
|||
// Did you get a time-over?
|
||||
PF_TIMEOVER = 1<<10,
|
||||
|
||||
// Ready for Super?
|
||||
PF_SUPERREADY = 1<<11,
|
||||
PF_TEMPSLOT1 = 1<<11,
|
||||
|
||||
// Character action status
|
||||
PF_JUMPED = 1<<12,
|
||||
|
@ -133,12 +132,10 @@ typedef enum
|
|||
// Sliding (usually in water) like Labyrinth/Oil Ocean
|
||||
PF_SLIDING = 1<<17,
|
||||
|
||||
/*** NIGHTS STUFF ***/
|
||||
// Is the player in NiGHTS mode?
|
||||
PF_NIGHTSMODE = 1<<18,
|
||||
PF_TRANSFERTOCLOSEST = 1<<19,
|
||||
PF_TEMPSLOT2 = 1<<18,
|
||||
|
||||
// Spill rings after falling
|
||||
/*** NIGHTS STUFF ***/
|
||||
PF_TRANSFERTOCLOSEST = 1<<19,
|
||||
PF_NIGHTSFALL = 1<<20,
|
||||
PF_DRILLING = 1<<21,
|
||||
PF_SKIDDOWN = 1<<22,
|
||||
|
@ -226,6 +223,8 @@ typedef enum
|
|||
CR_GENERIC,
|
||||
// Tails carry.
|
||||
CR_PLAYER,
|
||||
// NiGHTS mode. Not technically a CARRYING, but doesn't stack with any of the others, so might as well go here.
|
||||
CR_NIGHTSMODE,
|
||||
// Specific level gimmicks.
|
||||
CR_ZOOMTUBE,
|
||||
CR_ROPEHANG,
|
||||
|
|
|
@ -6948,8 +6948,7 @@ static const char *const PLAYERFLAG_LIST[] = {
|
|||
// Did you get a time-over?
|
||||
"TIMEOVER",
|
||||
|
||||
// Ready for Super?
|
||||
"SUPERREADY",
|
||||
"TEMPSLOT1",
|
||||
|
||||
// Character action status
|
||||
"JUMPED",
|
||||
|
@ -6963,12 +6962,10 @@ static const char *const PLAYERFLAG_LIST[] = {
|
|||
// Sliding (usually in water) like Labyrinth/Oil Ocean
|
||||
"SLIDING",
|
||||
|
||||
/*** NIGHTS STUFF ***/
|
||||
// Is the player in NiGHTS mode?
|
||||
"NIGHTSMODE",
|
||||
"TRANSFERTOCLOSEST",
|
||||
"TEMPSLOT2",
|
||||
|
||||
// Spill rings after falling
|
||||
/*** NIGHTS STUFF ***/
|
||||
"TRANSFERTOCLOSEST",
|
||||
"NIGHTSFALL",
|
||||
"DRILLING",
|
||||
"SKIDDOWN",
|
||||
|
@ -7357,6 +7354,7 @@ struct {
|
|||
{"CR_NONE",CR_NONE},
|
||||
{"CR_GENERIC",CR_GENERIC},
|
||||
{"CR_PLAYER",CR_PLAYER},
|
||||
{"CR_NIGHTSMODE",CR_NIGHTSMODE},
|
||||
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
|
||||
{"CR_ROPEHANG",CR_ROPEHANG},
|
||||
{"CR_MACESPIN",CR_MACESPIN},
|
||||
|
|
18
src/g_game.c
18
src/g_game.c
|
@ -1015,9 +1015,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
if (cv_analog.value || twodlevel
|
||||
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|
||||
|| (!demoplayback && (player->climbing
|
||||
|| (player->pflags & PF_NIGHTSMODE)
|
||||
|| (player->pflags & PF_SLIDING)
|
||||
|| (player->pflags & PF_FORCESTRAFE)))) // Analog
|
||||
|| (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
|| (player->pflags & (PF_SLIDING|PF_FORCESTRAFE))))) // Analog
|
||||
forcestrafe = true;
|
||||
if (forcestrafe) // Analog
|
||||
{
|
||||
|
@ -1120,7 +1119,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
cmd->buttons |= BT_USE;
|
||||
|
||||
// Camera Controls
|
||||
if (cv_debug || cv_analog.value || demoplayback || objectplacing || player->pflags & PF_NIGHTSMODE)
|
||||
if (cv_debug || cv_analog.value || demoplayback || objectplacing || player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
if (PLAYER1INPUTDOWN(gc_camleft))
|
||||
cmd->buttons |= BT_CAMLEFT;
|
||||
|
@ -1306,9 +1305,8 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
|||
if (cv_analog2.value || twodlevel
|
||||
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|
||||
|| player->climbing
|
||||
|| (player->pflags & PF_NIGHTSMODE)
|
||||
|| (player->pflags & PF_SLIDING)
|
||||
|| (player->pflags & PF_FORCESTRAFE)) // Analog
|
||||
|| (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
|| (player->pflags & (PF_SLIDING|PF_FORCESTRAFE))) // Analog
|
||||
forcestrafe = true;
|
||||
if (forcestrafe) // Analog
|
||||
{
|
||||
|
@ -1408,7 +1406,7 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
|||
cmd->buttons |= BT_USE;
|
||||
|
||||
// Camera Controls
|
||||
if (cv_debug || cv_analog2.value || player->pflags & PF_NIGHTSMODE)
|
||||
if (cv_debug || cv_analog2.value || player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
if (PLAYER2INPUTDOWN(gc_camleft))
|
||||
cmd->buttons |= BT_CAMLEFT;
|
||||
|
@ -3920,7 +3918,7 @@ void G_WriteGhostTic(mobj_t *ghost)
|
|||
if (!(demoflags & DF_GHOST))
|
||||
return; // No ghost data to write.
|
||||
|
||||
if (ghost->player && ghost->player->pflags & PF_NIGHTSMODE) // We're talking about the NiGHTS thing, not the normal platforming thing!
|
||||
if (ghost->player && ghost->player->powers[pw_carry] == CR_NIGHTSMODE) // We're talking about the NiGHTS thing, not the normal platforming thing!
|
||||
ziptic |= GZT_NIGHTS;
|
||||
|
||||
ziptic_p = demo_p++; // the ziptic, written at the end of this function
|
||||
|
@ -4104,7 +4102,7 @@ void G_ConsGhostTic(void)
|
|||
if (ziptic & GZT_SPR2)
|
||||
demo_p++;
|
||||
if (ziptic & GZT_NIGHTS) {
|
||||
if (!testmo->player || !(testmo->player->pflags & PF_NIGHTSMODE))
|
||||
if (!testmo->player || !(testmo->player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
nightsfail = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -942,7 +942,7 @@ boolean OP_FreezeObjectplace(void)
|
|||
if (!objectplacing)
|
||||
return false;
|
||||
|
||||
if ((maptol & TOL_NIGHTS) && (players[consoleplayer].pflags & PF_NIGHTSMODE))
|
||||
if ((maptol & TOL_NIGHTS) && (players[consoleplayer].powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -1255,7 +1255,7 @@ void Command_ObjectPlace_f(void)
|
|||
{
|
||||
objectplacing = true;
|
||||
|
||||
if ((players[0].pflags & PF_NIGHTSMODE))
|
||||
if ((players[0].powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
|
||||
if (!COM_CheckParm("-silent"))
|
||||
|
@ -1326,7 +1326,7 @@ void Command_ObjectPlace_f(void)
|
|||
|
||||
// Don't touch the NiGHTS Objectplace stuff.
|
||||
// ... or if the mo mysteriously vanished.
|
||||
if (!players[0].mo || (players[0].pflags & PF_NIGHTSMODE))
|
||||
if (!players[0].mo || (players[0].powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
|
||||
// If still in dummy state, get out of it.
|
||||
|
|
|
@ -5611,7 +5611,7 @@ void A_MixUp(mobj_t *actor)
|
|||
// and grab their xyz coords
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && players[i].mo->health > 0 && players[i].playerstate == PST_LIVE
|
||||
&& !players[i].exiting && !players[i].powers[pw_super])
|
||||
&& !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if ((netgame || multiplayer) && players[i].spectator) // Ignore spectators
|
||||
continue;
|
||||
|
@ -5730,7 +5730,7 @@ void A_MixUp(mobj_t *actor)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && players[i].playerstate == PST_LIVE
|
||||
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super])
|
||||
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if ((netgame || multiplayer) && players[i].spectator)// Ignore spectators
|
||||
continue;
|
||||
|
@ -5780,7 +5780,7 @@ void A_MixUp(mobj_t *actor)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && players[i].playerstate == PST_LIVE
|
||||
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super])
|
||||
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if ((netgame || multiplayer) && players[i].spectator)// Ignore spectators
|
||||
continue;
|
||||
|
@ -5810,7 +5810,7 @@ void A_MixUp(mobj_t *actor)
|
|||
if (teleported[i])
|
||||
{
|
||||
if (playeringame[i] && players[i].playerstate == PST_LIVE
|
||||
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super])
|
||||
&& players[i].mo && players[i].mo->health > 0 && !players[i].exiting && !players[i].powers[pw_super] && players[i].powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if ((netgame || multiplayer) && players[i].spectator)// Ignore spectators
|
||||
continue;
|
||||
|
@ -8238,7 +8238,7 @@ void A_OrbitNights(mobj_t* actor)
|
|||
#endif
|
||||
|
||||
if (!actor->target || !actor->target->player ||
|
||||
!(actor->target->player->pflags & PF_NIGHTSMODE) || !actor->target->player->nightstime
|
||||
!(actor->target->player->powers[pw_carry] == CR_NIGHTSMODE) || !actor->target->player->nightstime
|
||||
// Also remove this object if they no longer have a NiGHTS helper
|
||||
|| (ishelper && !actor->target->player->powers[pw_nights_helper]))
|
||||
{
|
||||
|
|
|
@ -367,7 +367,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
return;
|
||||
}
|
||||
|
||||
if (((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
|| ((player->pflags & PF_JUMPED) && (player->pflags & PF_FORCEJUMPDAMAGE || !(player->charflags & SF_NOJUMPSPIN) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
||||
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||
|
@ -408,7 +408,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
////////////////////////////////////////////////////////
|
||||
/////ENEMIES!!//////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////
|
||||
if (special->type == MT_GSNAPPER && !(((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
if (special->type == MT_GSNAPPER && !(((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
|| player->powers[pw_invulnerability] || player->powers[pw_super] || elementalpierce)
|
||||
&& toucher->z < special->z + special->height && toucher->z + toucher->height > special->z)
|
||||
{
|
||||
|
@ -426,7 +426,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
else // Cannot hit sharp from above or when red and angry
|
||||
P_DamageMobj(toucher, special, special, 1, 0);
|
||||
}
|
||||
else if (((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
else if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
|| ((player->pflags & PF_JUMPED) && (player->pflags & PF_FORCEJUMPDAMAGE || !(player->charflags & SF_NOJUMPSPIN) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
||||
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||
|
@ -765,12 +765,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
else //Initial transformation. Don't allow second chances in special stages!
|
||||
{
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
return;
|
||||
|
||||
S_StartSound(toucher, sfx_supert);
|
||||
}
|
||||
if (!(netgame || multiplayer) && !(player->pflags & PF_NIGHTSMODE))
|
||||
if (!(netgame || multiplayer) && !(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
P_SetTarget(&special->tracer, toucher);
|
||||
P_NightserizePlayer(player, special->health); // Transform!
|
||||
return;
|
||||
|
@ -894,7 +894,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
return;
|
||||
|
||||
// make sure everything is as it should be, THEN take rings from players in special stages
|
||||
if (player->pflags & PF_NIGHTSMODE && !toucher->target)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE && !toucher->target)
|
||||
return;
|
||||
|
||||
if (player->mare != special->threshold) // wrong mare
|
||||
|
@ -932,7 +932,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (player->bumpertime < TICRATE/4)
|
||||
{
|
||||
S_StartSound(toucher, special->info->seesound);
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
player->bumpertime = TICRATE/2;
|
||||
if (special->threshold > 0)
|
||||
|
@ -988,14 +988,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
return;
|
||||
case MT_NIGHTSSUPERLOOP:
|
||||
if (player->bot || !(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->bot || !(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
if (!G_IsSpecialStage(gamemap))
|
||||
player->powers[pw_nights_superloop] = (UINT16)special->info->speed;
|
||||
else
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
players[i].powers[pw_nights_superloop] = (UINT16)special->info->speed;
|
||||
if (special->info->deathsound != sfx_None)
|
||||
S_StartSound(NULL, special->info->deathsound);
|
||||
|
@ -1010,14 +1010,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
break;
|
||||
case MT_NIGHTSDRILLREFILL:
|
||||
if (player->bot || !(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->bot || !(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
if (!G_IsSpecialStage(gamemap))
|
||||
player->drillmeter = special->info->speed;
|
||||
else
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
players[i].drillmeter = special->info->speed;
|
||||
if (special->info->deathsound != sfx_None)
|
||||
S_StartSound(NULL, special->info->deathsound);
|
||||
|
@ -1032,7 +1032,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
break;
|
||||
case MT_NIGHTSHELPER:
|
||||
if (player->bot || !(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->bot || !(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
if (!G_IsSpecialStage(gamemap))
|
||||
{
|
||||
|
@ -1046,7 +1046,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
{
|
||||
mobj_t *flickyobj;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && players[i].pflags & PF_NIGHTSMODE) {
|
||||
if (playeringame[i] && players[i].mo && players[i].powers[pw_carry] == CR_NIGHTSMODE) {
|
||||
players[i].powers[pw_nights_helper] = (UINT16)special->info->speed;
|
||||
flickyobj = P_SpawnMobj(players[i].mo->x, players[i].mo->y, players[i].mo->z + players[i].mo->info->height, MT_NIGHTOPIANHELPER);
|
||||
P_SetTarget(&flickyobj->target, players[i].mo);
|
||||
|
@ -1064,7 +1064,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
break;
|
||||
case MT_NIGHTSEXTRATIME:
|
||||
if (player->bot || !(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->bot || !(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
if (!G_IsSpecialStage(gamemap))
|
||||
{
|
||||
|
@ -1075,7 +1075,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
else
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
players[i].nightstime += special->info->speed;
|
||||
players[i].startedtime += special->info->speed;
|
||||
|
@ -1094,7 +1094,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
break;
|
||||
case MT_NIGHTSLINKFREEZE:
|
||||
if (player->bot || !(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->bot || !(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
return;
|
||||
if (!G_IsSpecialStage(gamemap))
|
||||
{
|
||||
|
@ -1104,7 +1104,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
else
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
players[i].powers[pw_nights_linkfreeze] += (UINT16)special->info->speed;
|
||||
players[i].linktimer = 2*TICRATE;
|
||||
|
@ -1162,7 +1162,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (G_IsSpecialStage(gamemap))
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
players[i].drillmeter += TICRATE/2;
|
||||
}
|
||||
else if (player->bot)
|
||||
|
@ -1420,7 +1420,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
S_StartSound(toucher, special->info->painsound);
|
||||
return;
|
||||
}
|
||||
else if (((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
else if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||
|| ((player->pflags & PF_JUMPED) && (player->pflags & PF_FORCEJUMPDAMAGE || !(player->charflags & SF_NOJUMPSPIN) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
||||
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
||||
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
||||
|
@ -2733,7 +2733,7 @@ static inline boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj
|
|||
|
||||
static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
|
||||
{
|
||||
player->pflags &= ~(PF_SLIDING|PF_NIGHTSMODE);
|
||||
player->pflags &= ~PF_SLIDING;
|
||||
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
|
||||
|
@ -3075,7 +3075,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
if (player->pflags & PF_GODMODE)
|
||||
return false;
|
||||
|
||||
if (!(target->player->pflags & (PF_NIGHTSMODE|PF_NIGHTSFALL)) && (maptol & TOL_NIGHTS))
|
||||
if (!(target->player->powers[pw_carry] == CR_NIGHTSMODE || target->player->pflags & PF_NIGHTSFALL) && (maptol & TOL_NIGHTS))
|
||||
return false;
|
||||
|
||||
switch (damagetype)
|
||||
|
@ -3097,7 +3097,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
}
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE) // NiGHTS damage handling
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE) // NiGHTS damage handling
|
||||
{
|
||||
if (!force)
|
||||
{
|
||||
|
|
13
src/p_map.c
13
src/p_map.c
|
@ -124,7 +124,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
if (object->player && object->player->spectator)
|
||||
return false;
|
||||
|
||||
if (object->player && (object->player->pflags & PF_NIGHTSMODE))
|
||||
if (object->player && (object->player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
{
|
||||
/*Someone want to make these work like bumpers?*/
|
||||
return false;
|
||||
|
@ -325,9 +325,6 @@ static void P_DoTailsCarry(player_t *sonic, player_t *tails)
|
|||
if (tails->bot == 1)
|
||||
return;
|
||||
|
||||
if (sonic->pflags & PF_NIGHTSMODE)
|
||||
return;
|
||||
|
||||
if ((sonic->mo->eflags & MFE_VERTICALFLIP) != (tails->mo->eflags & MFE_VERTICALFLIP))
|
||||
return; // Both should be in same gravity
|
||||
|
||||
|
@ -378,6 +375,7 @@ static void P_DoTailsCarry(player_t *sonic, player_t *tails)
|
|||
else {
|
||||
if (sonic-players == consoleplayer && botingame)
|
||||
CV_SetValue(&cv_analog2, true);
|
||||
P_SetTarget(&sonic->mo->tracer, NULL);
|
||||
sonic->powers[pw_carry] = CR_NONE;
|
||||
}
|
||||
}
|
||||
|
@ -500,7 +498,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
// Don't collide with your buddies while NiGHTS-flying.
|
||||
if (tmthing->player && thing->player && (maptol & TOL_NIGHTS)
|
||||
&& ((tmthing->player->pflags & PF_NIGHTSMODE) || (thing->player->pflags & PF_NIGHTSMODE)))
|
||||
&& ((tmthing->player->powers[pw_carry] == CR_NIGHTSMODE) || (thing->player->powers[pw_carry] == CR_NIGHTSMODE)))
|
||||
return true;
|
||||
|
||||
blockdist = thing->radius + tmthing->radius;
|
||||
|
@ -897,7 +895,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
// must be flying in the SAME DIRECTION as the last time you came through.
|
||||
// not (your direction) xor (stored direction)
|
||||
// In other words, you can't u-turn and respawn rings near the drone.
|
||||
if (pl->bonustime && (pl->pflags & PF_NIGHTSMODE) && (INT32)leveltime > droneobj->extravalue2 && (
|
||||
if (pl->bonustime && (pl->powers[pw_carry] == CR_NIGHTSMODE) && (INT32)leveltime > droneobj->extravalue2 && (
|
||||
!(pl->anotherflyangle >= 90 && pl->anotherflyangle <= 270)
|
||||
^ (droneobj->extravalue1 >= 90 && droneobj->extravalue1 <= 270)
|
||||
))
|
||||
|
@ -1006,8 +1004,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->player-players == consoleplayer && botingame)
|
||||
CV_SetValue(&cv_analog2, true);
|
||||
if (thing->player->powers[pw_carry] == CR_PLAYER)
|
||||
{
|
||||
P_SetTarget(&thing->tracer, NULL);
|
||||
thing->player->powers[pw_carry] = CR_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (thing->player)
|
||||
{
|
||||
|
|
27
src/p_mobj.c
27
src/p_mobj.c
|
@ -1581,11 +1581,8 @@ static void P_PlayerFlip(mobj_t *mo)
|
|||
G_GhostAddFlip();
|
||||
// Flip aiming to match!
|
||||
|
||||
if (mo->player->pflags & PF_NIGHTSMODE) // NiGHTS doesn't use flipcam
|
||||
{
|
||||
if (mo->tracer)
|
||||
mo->tracer->eflags ^= MFE_VERTICALFLIP;
|
||||
}
|
||||
if (mo->player->powers[pw_carry] == CR_NIGHTSMODE) // NiGHTS doesn't use flipcam
|
||||
;
|
||||
else if (mo->player->pflags & PF_FLIPCAM)
|
||||
{
|
||||
mo->player->aiming = InvAngle(mo->player->aiming);
|
||||
|
@ -1681,7 +1678,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
|| (mo->player->charability == CA_FLY && (mo->player->powers[pw_tailsfly]
|
||||
|| mo->state-states == S_PLAY_FLY_TIRED)))
|
||||
gravityadd = gravityadd/3; // less gravity while flying/gliding
|
||||
if (mo->player->climbing || (mo->player->pflags & PF_NIGHTSMODE))
|
||||
if (mo->player->climbing || (mo->player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
gravityadd = 0;
|
||||
|
||||
if (!(mo->flags2 & MF2_OBJECTFLIP) != !(mo->player->powers[pw_gravityboots])) // negated to turn numeric into bool - would be double negated, but not needed if both would be
|
||||
|
@ -2253,7 +2250,7 @@ void P_XYMovement(mobj_t *mo)
|
|||
// Check the gravity status.
|
||||
P_CheckGravity(mo, false);
|
||||
|
||||
if (player && !moved && player->pflags & PF_NIGHTSMODE && mo->target)
|
||||
if (player && !moved && player->powers[pw_carry] == CR_NIGHTSMODE && mo->target)
|
||||
{
|
||||
angle_t fa;
|
||||
|
||||
|
@ -2296,7 +2293,7 @@ void P_XYMovement(mobj_t *mo)
|
|||
if (player && player->homing) // no friction for homing
|
||||
return;
|
||||
|
||||
if (player && player->pflags & PF_NIGHTSMODE)
|
||||
if (player && player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
return; // no friction for NiGHTS players
|
||||
|
||||
#ifdef ESLOPE
|
||||
|
@ -3078,7 +3075,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
|||
else
|
||||
mo->z = mo->floorz;
|
||||
|
||||
if (mo->player->pflags & PF_NIGHTSMODE)
|
||||
if (mo->player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
// bounce off floor if you were flying towards it
|
||||
if ((mo->eflags & MFE_VERTICALFLIP && mo->player->flyangle > 0 && mo->player->flyangle < 180)
|
||||
|
@ -3338,7 +3335,7 @@ nightsdone:
|
|||
else
|
||||
mo->z = mo->ceilingz - mo->height;
|
||||
|
||||
if (mo->player->pflags & PF_NIGHTSMODE)
|
||||
if (mo->player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
// bounce off ceiling if you were flying towards it
|
||||
if ((mo->eflags & MFE_VERTICALFLIP && mo->player->flyangle > 180 && mo->player->flyangle <= 359)
|
||||
|
@ -3551,7 +3548,7 @@ static boolean P_SceneryZMovement(mobj_t *mo)
|
|||
//
|
||||
boolean P_CanRunOnWater(player_t *player, ffloor_t *rover)
|
||||
{
|
||||
if (!(player->pflags & PF_NIGHTSMODE) && !player->homing
|
||||
if (!player->powers[pw_carry] && !player->homing
|
||||
&& ((player->powers[pw_super] || player->charflags & SF_RUNONWATER || player->dashmode >= 3*TICRATE) && player->mo->ceilingz-*rover->topheight >= player->mo->height)
|
||||
&& (rover->flags & FF_SWIMMABLE) && !(player->pflags & PF_SPINNING) && player->speed > FixedMul(player->runspeed, player->mo->scale)
|
||||
&& !(player->pflags & PF_SLIDING)
|
||||
|
@ -3980,7 +3977,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
|| (thiscam == &camera2 && players[secondarydisplayplayer].mo && (players[secondarydisplayplayer].mo->flags2 & MF2_TWOD)))
|
||||
itsatwodlevel = true;
|
||||
|
||||
if (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
if (player->pflags & PF_FLIPCAM && !(player->powers[pw_carry] == CR_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
postimg = postimg_flip;
|
||||
else if (player->awayviewtics)
|
||||
{
|
||||
|
@ -4236,7 +4233,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!(mobj->player->pflags & PF_NIGHTSMODE)) // "jumping" is used for drilling
|
||||
if (!(mobj->player->powers[pw_carry] == CR_NIGHTSMODE)) // "jumping" is used for drilling
|
||||
mobj->player->jumping = 0;
|
||||
mobj->player->pflags &= ~PF_JUMPED;
|
||||
if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
|
||||
|
@ -7558,7 +7555,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
else if (mobj->tracer && mobj->tracer->player)
|
||||
{
|
||||
if (!(mobj->tracer->player->pflags & PF_NIGHTSMODE))
|
||||
if (!(mobj->tracer->player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
{
|
||||
mobj->flags &= ~MF_NOGRAVITY;
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
|
@ -7610,7 +7607,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_SetTarget(&mobj->target, NULL);
|
||||
}
|
||||
|
||||
if (mobj->tracer->player->pflags & PF_NIGHTSMODE)
|
||||
if (mobj->tracer->player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
if (mobj->tracer->player->bonustime)
|
||||
{
|
||||
|
|
|
@ -2774,8 +2774,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i])
|
||||
{
|
||||
players[i].pflags &= ~PF_NIGHTSMODE;
|
||||
|
||||
// Start players with pity shields if possible
|
||||
players[i].pity = -1;
|
||||
|
||||
|
|
|
@ -3530,7 +3530,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
|
|||
P_DamageMobj(player->mo, NULL, NULL, 1, 0);
|
||||
break;
|
||||
case 2: // Damage (Water)
|
||||
if ((roversector || P_MobjReadyToTrigger(player->mo, sector)) && (player->powers[pw_underwater] || player->pflags & PF_NIGHTSMODE))
|
||||
if ((roversector || P_MobjReadyToTrigger(player->mo, sector)) && (player->powers[pw_underwater] || player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_WATER);
|
||||
break;
|
||||
case 3: // Damage (Fire)
|
||||
|
@ -4083,7 +4083,7 @@ DoneSection2:
|
|||
{
|
||||
player->laps++;
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
player->drillmeter += 48*20;
|
||||
|
||||
if (player->laps >= (UINT8)cv_numlaps.value)
|
||||
|
@ -7256,7 +7256,7 @@ static inline boolean PIT_PushThing(mobj_t *thing)
|
|||
return false;
|
||||
|
||||
// Allow this to affect pushable objects at some point?
|
||||
if (thing->player && (!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) || thing->player->pflags & PF_NIGHTSMODE))
|
||||
if (thing->player && (!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) || thing->player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
{
|
||||
INT32 dist;
|
||||
INT32 speed;
|
||||
|
@ -7287,7 +7287,7 @@ static inline boolean PIT_PushThing(mobj_t *thing)
|
|||
// Written with bits and pieces of P_HomingAttack
|
||||
if ((speed > 0) && (P_CheckSight(thing, tmpusher->source)))
|
||||
{
|
||||
if (!(thing->player->pflags & PF_NIGHTSMODE))
|
||||
if (thing->player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
// only push wrt Z if health & 1 (mapthing has ambush flag)
|
||||
if (tmpusher->source->health & 1)
|
||||
|
|
|
@ -163,6 +163,7 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
if (playeringame[p] && players[p].mo && players[p].powers[pw_carry] == CR_PLAYER && players[p].mo->tracer == thing)
|
||||
{
|
||||
players[p].powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&players[p].mo->tracer, NULL);
|
||||
break;
|
||||
}
|
||||
thing->player->cmomx = thing->player->cmomy = 0;
|
||||
|
|
86
src/p_user.c
86
src/p_user.c
|
@ -574,7 +574,7 @@ static void P_DeNightserizePlayer(player_t *player)
|
|||
thinker_t *th;
|
||||
mobj_t *mo2;
|
||||
|
||||
player->pflags &= ~PF_NIGHTSMODE;
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
|
||||
player->powers[pw_underwater] = 0;
|
||||
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_THOKKED|PF_SPINNING|PF_DRILLING|PF_TRANSFERTOCLOSEST);
|
||||
|
@ -609,7 +609,7 @@ static void P_DeNightserizePlayer(player_t *player)
|
|||
{
|
||||
INT32 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
players[i].nightstime = 1; // force everyone else to fall too.
|
||||
player->exiting = 3*TICRATE;
|
||||
stagefailed = true; // NIGHT OVER
|
||||
|
@ -647,7 +647,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
if (player->bot)
|
||||
return;
|
||||
|
||||
if (!(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||
player->mo->height = P_GetPlayerHeight(player); // Just to make sure jumping into the drone doesn't result in a squashed hitbox.
|
||||
|
||||
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_THOKKED|PF_SHIELDABILITY|PF_SPINNING|PF_DRILLING);
|
||||
|
@ -697,7 +697,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
if (G_IsSpecialStage(gamemap))
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i]/* && players[i].pflags & PF_NIGHTSMODE*/)
|
||||
if (playeringame[i]/* && players[i].powers[pw_carry] == CR_NIGHTSMODE*/)
|
||||
total_rings += players[i].rings;
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
player->texttimer = (UINT8)(110 - timeinmap);
|
||||
}
|
||||
|
||||
player->pflags |= PF_NIGHTSMODE;
|
||||
player->powers[pw_carry] = CR_NIGHTSMODE;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -872,7 +872,10 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
|
|||
void P_ResetPlayer(player_t *player)
|
||||
{
|
||||
player->pflags &= ~(PF_SPINNING|PF_STARTDASH|PF_JUMPED|PF_FORCEJUMPDAMAGE|PF_GLIDING|PF_THOKKED|PF_CANCARRY|PF_SHIELDABILITY|PF_BOUNCING);
|
||||
|
||||
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
|
||||
player->jumping = 0;
|
||||
player->secondjump = 0;
|
||||
player->glidetime = 0;
|
||||
|
@ -1001,7 +1004,7 @@ void P_AddPlayerScore(player_t *player, UINT32 amount)
|
|||
{ // Pseudo-shared score for multiplayer special stages.
|
||||
INT32 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
oldscore = players[i].marescore;
|
||||
|
||||
|
@ -2244,7 +2247,7 @@ static void P_DoBubbleBreath(player_t *player)
|
|||
fixed_t z = player->mo->z;
|
||||
mobj_t *bubble = NULL;
|
||||
|
||||
if (!(player->mo->eflags & MFE_UNDERWATER) || ((player->powers[pw_shield] & SH_PROTECTWATER) && !(player->pflags & PF_NIGHTSMODE)) || player->spectator)
|
||||
if (!(player->mo->eflags & MFE_UNDERWATER) || ((player->powers[pw_shield] & SH_PROTECTWATER) && !(player->powers[pw_carry] == CR_NIGHTSMODE)) || player->spectator)
|
||||
return;
|
||||
|
||||
if (player->charflags & SF_MACHINE)
|
||||
|
@ -2279,7 +2282,7 @@ static void P_DoBubbleBreath(player_t *player)
|
|||
P_SetScale(bubble, bubble->destscale);
|
||||
}
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE) // NiGHTS Super doesn't spawn flight bubbles
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE) // NiGHTS Super doesn't spawn flight bubbles
|
||||
return;
|
||||
|
||||
// Tails stirs up the water while flying in it
|
||||
|
@ -3428,15 +3431,9 @@ static void P_DoSuperStuff(player_t *player)
|
|||
|| (player->mo->state == &states[S_PLAY_SUPER_TRANS9] && player->mo->tics > 1))) // needed to prevent one-frame old colour...
|
||||
return; // don't do anything right now, we're in the middle of transforming!
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
return; // NiGHTS Super doesn't mix with normal super
|
||||
|
||||
// Does player have all emeralds? If so, flag the "Ready For Super!"
|
||||
if (ALL7EMERALDS(emeralds) && player->rings >= 50)
|
||||
player->pflags |= PF_SUPERREADY;
|
||||
else
|
||||
player->pflags &= ~PF_SUPERREADY;
|
||||
|
||||
if (player->powers[pw_super])
|
||||
{
|
||||
// If you're super and not Sonic, de-superize!
|
||||
|
@ -3537,10 +3534,10 @@ static void P_DoSuperStuff(player_t *player)
|
|||
//
|
||||
boolean P_SuperReady(player_t *player)
|
||||
{
|
||||
if (player->pflags & PF_SUPERREADY && !player->powers[pw_super] && !player->powers[pw_tailsfly]
|
||||
if ((ALL7EMERALDS(emeralds) && player->rings >= 50) && !player->powers[pw_super] && !player->powers[pw_tailsfly]
|
||||
&& !(player->powers[pw_shield] & SH_NOSTACK)
|
||||
&& !player->powers[pw_invulnerability]
|
||||
&& !(maptol & TOL_NIGHTS) // don't turn 'regular super' in nights levels
|
||||
&& !(maptol & TOL_NIGHTS || (player->powers[pw_carry] == CR_NIGHTSMODE)) // don't turn 'regular super' in nights levels
|
||||
&& player->pflags & PF_JUMPED
|
||||
&& player->charflags & SF_SUPER)
|
||||
return true;
|
||||
|
@ -3608,6 +3605,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
{
|
||||
player->mo->momz = 9*FRACUNIT;
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
if (player-players == consoleplayer && botingame)
|
||||
CV_SetValue(&cv_analog2, true);
|
||||
}
|
||||
|
@ -3615,6 +3613,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
{
|
||||
player->mo->momz = 9*FRACUNIT;
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
else if (player->powers[pw_carry] == CR_ROPEHANG)
|
||||
{
|
||||
|
@ -4127,6 +4126,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
else if (player->powers[pw_carry] == CR_MACESPIN && player->mo->tracer)
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
player->powers[pw_flashing] = TICRATE/4;
|
||||
}
|
||||
else
|
||||
|
@ -5597,7 +5597,7 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
|||
else if (player->mo->z < player->capsule->z+(player->capsule->height/3))
|
||||
player->mo->momz = 2*FRACUNIT;
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
if (player->mo->momx || player->mo->momy || player->mo->momz)
|
||||
{
|
||||
|
@ -5675,7 +5675,7 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
|||
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
||||
}*/
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
// Only give it to ONE person, and THAT player has to get to the goal!
|
||||
emmo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->info->height, MT_GOTEMERALD);
|
||||
|
@ -5689,7 +5689,7 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
|||
// Find the player with the lowest time remaining and award points based on that time instead.
|
||||
lowest_time = player->finishedtime;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
if (players[i].finishedtime < lowest_time)
|
||||
lowest_time = players[i].finishedtime;
|
||||
P_AddPlayerScore(player, (lowest_time/TICRATE) * 100);
|
||||
|
@ -5762,7 +5762,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
player->drillmeter = TICRATE/10;
|
||||
}
|
||||
|
||||
if (!(player->pflags & PF_NIGHTSMODE))
|
||||
if (!(player->powers[pw_carry] == CR_NIGHTSMODE))
|
||||
{
|
||||
P_DeNightserizePlayer(player);
|
||||
return;
|
||||
|
@ -5773,7 +5773,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
boolean capsule = false;
|
||||
// NiGHTS special stages have a pseudo-shared timer, so check if ANYONE is feeding the capsule.
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] /*&& players[i].pflags & PF_NIGHTSMODE*/
|
||||
if (playeringame[i] /*&& players[i].powers[pw_carry] == CR_NIGHTSMODE*/
|
||||
&& (players[i].capsule && players[i].capsule->reactiontime))
|
||||
capsule = true;
|
||||
if (!capsule
|
||||
|
@ -6597,7 +6597,7 @@ static void P_MovePlayer(player_t *player)
|
|||
// Locate the capsule for this mare.
|
||||
else if (maptol & TOL_NIGHTS)
|
||||
{
|
||||
if ((player->pflags & PF_NIGHTSMODE)
|
||||
if ((player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
&& !(player->mo->state >= &states[S_PLAY_NIGHTS_TRANS]
|
||||
&& player->mo->state <= &states[S_PLAY_NIGHTS_TRANS6] // NOT 9 - it's 6 when the player turns their supercolor.
|
||||
&& !(player->exiting)))
|
||||
|
@ -6630,7 +6630,7 @@ static void P_MovePlayer(player_t *player)
|
|||
}
|
||||
|
||||
// Test revamped NiGHTS movement.
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
P_NiGHTSMovement(player);
|
||||
// No more goto blockchecking, let's just do all that here =D
|
||||
|
@ -8193,9 +8193,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
subsector_t *newsubsec;
|
||||
fixed_t f1, f2;
|
||||
|
||||
cameranoclip = (player->pflags & (PF_NOCLIP|PF_NIGHTSMODE)) || (player->mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)); // Noclipping player camera noclips too!!
|
||||
cameranoclip = (player->powers[pw_carry] == CR_NIGHTSMODE || player->pflags & PF_NOCLIP) || (player->mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)); // Noclipping player camera noclips too!!
|
||||
|
||||
if (!(player->climbing || (player->pflags & PF_NIGHTSMODE) || player->playerstate == PST_DEAD))
|
||||
if (!(player->climbing || (player->powers[pw_carry] == CR_NIGHTSMODE) || player->playerstate == PST_DEAD))
|
||||
{
|
||||
if (player->spectator) // force cam off for spectators
|
||||
return true;
|
||||
|
@ -8242,7 +8242,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
// if (leveltime > 0 && timeinmap <= 0)
|
||||
// return true;
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
focusangle = player->mo->angle;
|
||||
focusaiming = 0;
|
||||
|
@ -8299,7 +8299,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
angle = ANGLE_90;
|
||||
else if (camstill || resetcalled || player->playerstate == PST_DEAD)
|
||||
angle = thiscam->angle;
|
||||
else if (player->pflags & PF_NIGHTSMODE) // NiGHTS Level
|
||||
else if (player->powers[pw_carry] == CR_NIGHTSMODE) // NiGHTS Level
|
||||
{
|
||||
if ((player->pflags & PF_TRANSFERTOCLOSEST) && player->axis1 && player->axis2)
|
||||
{
|
||||
|
@ -8338,7 +8338,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
thiscam->angle = angle;
|
||||
}
|
||||
|
||||
if (!objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && !(player->pflags & PF_NIGHTSMODE) && displayplayer == consoleplayer)
|
||||
if (!objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && (player->powers[pw_carry] != CR_NIGHTSMODE) && displayplayer == consoleplayer)
|
||||
{
|
||||
#ifdef REDSANALOG
|
||||
if ((player->cmd.buttons & (BT_CAMLEFT|BT_CAMRIGHT)) == (BT_CAMLEFT|BT_CAMRIGHT)); else
|
||||
|
@ -8384,13 +8384,13 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
// sets ideal cam pos
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
dist = 480<<FRACBITS;
|
||||
else if (player->pflags & PF_NIGHTSMODE)
|
||||
else if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
dist = 320<<FRACBITS;
|
||||
else
|
||||
{
|
||||
dist = camdist;
|
||||
|
||||
if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->powers[pw_carry] && player->powers[pw_carry] != CR_PLAYER))
|
||||
if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->powers[pw_carry] == CR_ROPEHANG || player->powers[pw_carry] == CR_GENERIC || player->powers[pw_carry] == CR_MACESPIN))
|
||||
dist <<= 1;
|
||||
}
|
||||
|
||||
|
@ -8732,7 +8732,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
else
|
||||
player->mo->flags2 &= ~MF2_SHADOW;
|
||||
|
||||
/* if (!resetcalled && (player->pflags & PF_NIGHTSMODE && player->exiting))
|
||||
/* if (!resetcalled && (player->powers[pw_carry] == CR_NIGHTSMODE && player->exiting))
|
||||
{
|
||||
// Don't let the camera match your movement.
|
||||
thiscam->momz = 0;
|
||||
|
@ -9099,7 +9099,7 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
player->pflags |= PF_TIMEOVER;
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
P_DeNightserizePlayer(player);
|
||||
S_StartScreamSound(player->mo, sfx_s3k66);
|
||||
|
@ -9225,7 +9225,7 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
// Even if not NiGHTS, pull in nearby objects when walking around as John Q. Elliot.
|
||||
if (!objectplacing && !((netgame || multiplayer) && player->spectator)
|
||||
&& maptol & TOL_NIGHTS && (!(player->pflags & PF_NIGHTSMODE) || player->powers[pw_nights_helper]))
|
||||
&& maptol & TOL_NIGHTS && (player->powers[pw_carry] != CR_NIGHTSMODE || player->powers[pw_nights_helper]))
|
||||
{
|
||||
thinker_t *th;
|
||||
mobj_t *mo2;
|
||||
|
@ -9335,7 +9335,7 @@ void P_PlayerThink(player_t *player)
|
|||
#endif
|
||||
|
||||
// check for use
|
||||
if (!(player->pflags & PF_NIGHTSMODE))
|
||||
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if (cmd->buttons & BT_USE)
|
||||
player->pflags |= PF_USEDOWN;
|
||||
|
@ -9353,7 +9353,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (player->powers[pw_invulnerability] && player->powers[pw_invulnerability] < UINT16_MAX)
|
||||
player->powers[pw_invulnerability]--;
|
||||
|
||||
if (player->powers[pw_flashing] && player->powers[pw_flashing] < UINT16_MAX && ((player->pflags & PF_NIGHTSMODE) || player->powers[pw_flashing] < flashingtics))
|
||||
if (player->powers[pw_flashing] && player->powers[pw_flashing] < UINT16_MAX && ((player->powers[pw_carry] == CR_NIGHTSMODE) || player->powers[pw_flashing] < flashingtics))
|
||||
player->powers[pw_flashing]--;
|
||||
|
||||
if (player->powers[pw_tailsfly] && player->powers[pw_tailsfly] < UINT16_MAX && player->charability != CA_SWIM) // tails fly counter
|
||||
|
@ -9571,7 +9571,7 @@ void P_PlayerAfterThink(player_t *player)
|
|||
return;
|
||||
}
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
if (player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
player->powers[pw_gravityboots] = 0;
|
||||
//player->mo->eflags &= ~MFE_VERTICALFLIP;
|
||||
|
@ -9702,7 +9702,10 @@ void P_PlayerAfterThink(player_t *player)
|
|||
player->mo->height = FixedDiv(P_GetPlayerHeight(player), FixedDiv(14*FRACUNIT,10*FRACUNIT));
|
||||
|
||||
if (player->mo->tracer->player && !(player->mo->tracer->player->pflags & PF_CANCARRY))
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
|
@ -9710,7 +9713,10 @@ void P_PlayerAfterThink(player_t *player)
|
|||
&& (player->mo->tracer->eflags & MFE_VERTICALFLIP)) // Reverse gravity check for the carrier - Flame
|
||||
player->mo->z = player->mo->tracer->z + player->mo->tracer->height + FixedMul(FRACUNIT, player->mo->scale);
|
||||
else
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -9718,7 +9724,10 @@ void P_PlayerAfterThink(player_t *player)
|
|||
&& !(player->mo->tracer->eflags & MFE_VERTICALFLIP)) // Correct gravity check for the carrier - Flame
|
||||
player->mo->z = player->mo->tracer->z - player->mo->height - FixedMul(FRACUNIT, player->mo->scale);
|
||||
else
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (player->mo->tracer->health <= 0)
|
||||
|
@ -9745,7 +9754,10 @@ void P_PlayerAfterThink(player_t *player)
|
|||
}
|
||||
|
||||
if (P_AproxDistance(player->mo->x - player->mo->tracer->x, player->mo->y - player->mo->tracer->y) > player->mo->radius)
|
||||
{
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
}
|
||||
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
||||
|
||||
|
|
|
@ -1000,7 +1000,7 @@ void R_SetupFrame(player_t *player, boolean skybox)
|
|||
chasecam = (cv_chasecam.value != 0);
|
||||
}
|
||||
|
||||
if (player->climbing || (player->pflags & PF_NIGHTSMODE) || player->playerstate == PST_DEAD)
|
||||
if (player->climbing || (player->powers[pw_carry] == CR_NIGHTSMODE) || player->playerstate == PST_DEAD)
|
||||
chasecam = true; // force chasecam on
|
||||
else if (player->spectator) // no spectator chasecam
|
||||
chasecam = false; // force chasecam off
|
||||
|
|
|
@ -2647,7 +2647,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
|
||||
if (player->mo)
|
||||
{
|
||||
if ((player->pflags & PF_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_NGT0].numframes == 0)) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
|
||||
{
|
||||
skin = &skins[DEFAULTNIGHTSSKIN];
|
||||
newcolor = ((skin->flags & SF_SUPER) ? skin->supercolor : skin->prefcolor);
|
||||
|
|
|
@ -714,7 +714,7 @@ static void ST_drawLives(void)
|
|||
// skincolor face/super
|
||||
UINT8 *colormap = R_GetTranslationColormap(stplyr->skin, stplyr->mo->color, GTC_CACHE);
|
||||
patch_t *face = faceprefix[stplyr->skin];
|
||||
if ((stplyr->powers[pw_super] && (stplyr->mo->state < &states[S_PLAY_SUPER_TRANS] || stplyr->mo->state > &states[S_PLAY_SUPER_TRANS9])) || stplyr->pflags & PF_NIGHTSMODE)
|
||||
if ((stplyr->powers[pw_super] && (stplyr->mo->state < &states[S_PLAY_SUPER_TRANS] || stplyr->mo->state > &states[S_PLAY_SUPER_TRANS9])) || (stplyr->powers[pw_carry] == CR_NIGHTSMODE && skins[stplyr->skin].flags & SF_SUPER))
|
||||
face = superprefix[stplyr->skin];
|
||||
V_DrawSmallMappedPatch(hudinfo[HUD_LIVESPIC].x, hudinfo[HUD_LIVESPIC].y + (v_splitflag ? -12 : 0),
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag,face, colormap);
|
||||
|
@ -1077,7 +1077,7 @@ static void ST_drawNiGHTSHUD(void)
|
|||
#ifdef HAVE_BLUA
|
||||
LUA_HudEnabled(hud_nightsdrill) &&
|
||||
#endif
|
||||
stplyr->pflags & PF_NIGHTSMODE)
|
||||
stplyr->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
INT32 locx, locy;
|
||||
INT32 dfill;
|
||||
|
@ -1163,7 +1163,7 @@ static void ST_drawNiGHTSHUD(void)
|
|||
INT32 i;
|
||||
total_ringcount = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] /*&& players[i].pflags & PF_NIGHTSMODE*/ && players[i].rings)
|
||||
if (playeringame[i] /*&& players[i].powers[pw_carry] == CR_NIGHTSMODE*/ && players[i].rings)
|
||||
total_ringcount += players[i].rings;
|
||||
}
|
||||
else
|
||||
|
@ -1296,7 +1296,7 @@ static void ST_drawNiGHTSHUD(void)
|
|||
tic_t lowest_time = stplyr->nightstime;
|
||||
INT32 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE && players[i].nightstime < lowest_time)
|
||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE && players[i].nightstime < lowest_time)
|
||||
lowest_time = players[i].nightstime;
|
||||
realnightstime = lowest_time/TICRATE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue