mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Make exitmove friendly, don't start empty intermission screens
This commit is contained in:
parent
4e7b47440f
commit
7d77600e71
6 changed files with 45 additions and 39 deletions
|
@ -3743,7 +3743,7 @@ static void ExitMove_OnChange(void)
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
if (!(netgame || multiplayer) || !G_CoopGametype())
|
if (!(netgame || multiplayer) || !(gametyperules & GTR_FRIENDLY))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cv_exitmove.value)
|
if (cv_exitmove.value)
|
||||||
|
|
|
@ -3180,7 +3180,7 @@ void G_ExitLevel(void)
|
||||||
CV_SetValue(&cv_teamscramble, cv_scrambleonchange.value);
|
CV_SetValue(&cv_teamscramble, cv_scrambleonchange.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gametyperules & GTR_CAMPAIGN))
|
if (!(gametyperules & (GTR_FRIENDLY|GTR_CAMPAIGN)))
|
||||||
CONS_Printf(M_GetText("The round has ended.\n"));
|
CONS_Printf(M_GetText("The round has ended.\n"));
|
||||||
|
|
||||||
// Remove CEcho text on round end.
|
// Remove CEcho text on round end.
|
||||||
|
@ -3840,7 +3840,10 @@ static void G_DoCompleted(void)
|
||||||
if (nextmap < NUMMAPS && !mapheaderinfo[nextmap])
|
if (nextmap < NUMMAPS && !mapheaderinfo[nextmap])
|
||||||
P_AllocMapHeader(nextmap);
|
P_AllocMapHeader(nextmap);
|
||||||
|
|
||||||
if ((skipstats && !modeattacking) || (spec && modeattacking && stagefailed))
|
// If the current gametype has no intermission screen set, then don't start it.
|
||||||
|
Y_DetermineIntermissionType();
|
||||||
|
|
||||||
|
if ((skipstats && !modeattacking) || (spec && modeattacking && stagefailed) || (intertype == int_none))
|
||||||
{
|
{
|
||||||
G_UpdateVisited();
|
G_UpdateVisited();
|
||||||
G_AfterIntermission();
|
G_AfterIntermission();
|
||||||
|
|
|
@ -4100,7 +4100,7 @@ void P_SetupSignExit(player_t *player)
|
||||||
|
|
||||||
if (!numfound
|
if (!numfound
|
||||||
&& !(player->mo->target && player->mo->target->type == MT_SIGN)
|
&& !(player->mo->target && player->mo->target->type == MT_SIGN)
|
||||||
&& !(G_CoopGametype() && (netgame || multiplayer) && cv_exitmove.value))
|
&& !((gametyperules & GTR_FRIENDLY) && (netgame || multiplayer) && cv_exitmove.value))
|
||||||
P_SetTarget(&player->mo->target, thing);
|
P_SetTarget(&player->mo->target, thing);
|
||||||
|
|
||||||
if (thing->state != &states[thing->info->spawnstate])
|
if (thing->state != &states[thing->info->spawnstate])
|
||||||
|
@ -4131,7 +4131,7 @@ void P_SetupSignExit(player_t *player)
|
||||||
|
|
||||||
if (!numfound
|
if (!numfound
|
||||||
&& !(player->mo->target && player->mo->target->type == MT_SIGN)
|
&& !(player->mo->target && player->mo->target->type == MT_SIGN)
|
||||||
&& !(G_CoopGametype() && (netgame || multiplayer) && cv_exitmove.value))
|
&& !((gametyperules & GTR_FRIENDLY) && (netgame || multiplayer) && cv_exitmove.value))
|
||||||
P_SetTarget(&player->mo->target, thing);
|
P_SetTarget(&player->mo->target, thing);
|
||||||
|
|
||||||
if (thing->state != &states[thing->info->spawnstate])
|
if (thing->state != &states[thing->info->spawnstate])
|
||||||
|
|
|
@ -9925,7 +9925,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
if (player->exiting)
|
if (player->exiting)
|
||||||
{
|
{
|
||||||
if (mo->target && mo->target->type == MT_SIGN && mo->target->spawnpoint
|
if (mo->target && mo->target->type == MT_SIGN && mo->target->spawnpoint
|
||||||
&& !(G_CoopGametype() && (netgame || multiplayer) && cv_exitmove.value)
|
&& !((gametyperules & GTR_FRIENDLY) && (netgame || multiplayer) && cv_exitmove.value)
|
||||||
&& !(twodlevel || (mo->flags2 & MF2_TWOD)))
|
&& !(twodlevel || (mo->flags2 & MF2_TWOD)))
|
||||||
sign = mo->target;
|
sign = mo->target;
|
||||||
else if ((player->powers[pw_carry] == CR_NIGHTSMODE)
|
else if ((player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||||
|
@ -11826,7 +11826,7 @@ void P_PlayerThink(player_t *player)
|
||||||
|
|
||||||
if (player->pflags & PF_FINISHED)
|
if (player->pflags & PF_FINISHED)
|
||||||
{
|
{
|
||||||
if ((G_CoopGametype() && cv_exitmove.value) && !G_EnoughPlayersFinished())
|
if (((gametyperules & GTR_FRIENDLY) && cv_exitmove.value) && !G_EnoughPlayersFinished())
|
||||||
player->exiting = 0;
|
player->exiting = 0;
|
||||||
else
|
else
|
||||||
P_DoPlayerExit(player);
|
P_DoPlayerExit(player);
|
||||||
|
|
|
@ -229,8 +229,7 @@ static void Y_IntermissionTokenDrawer(void)
|
||||||
//
|
//
|
||||||
// Y_ConsiderScreenBuffer
|
// Y_ConsiderScreenBuffer
|
||||||
//
|
//
|
||||||
// Can we copy the current screen
|
// Can we copy the current screen to a buffer?
|
||||||
// to a buffer?
|
|
||||||
//
|
//
|
||||||
void Y_ConsiderScreenBuffer(void)
|
void Y_ConsiderScreenBuffer(void)
|
||||||
{
|
{
|
||||||
|
@ -256,9 +255,7 @@ void Y_ConsiderScreenBuffer(void)
|
||||||
//
|
//
|
||||||
// Y_RescaleScreenBuffer
|
// Y_RescaleScreenBuffer
|
||||||
//
|
//
|
||||||
// Write the rescaled source picture,
|
// Write the rescaled source picture, to the destination picture that has the current screen's resolutions.
|
||||||
// to the destination picture that
|
|
||||||
// has the current screen's resolutions.
|
|
||||||
//
|
//
|
||||||
static void Y_RescaleScreenBuffer(void)
|
static void Y_RescaleScreenBuffer(void)
|
||||||
{
|
{
|
||||||
|
@ -328,14 +325,6 @@ void Y_IntermissionDrawer(void)
|
||||||
if (rendermode == render_none)
|
if (rendermode == render_none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (intertype == int_none)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_BLUA
|
|
||||||
LUAh_IntermissionHUD();
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!usebuffer)
|
if (!usebuffer)
|
||||||
// Lactozilla: Renderer switching
|
// Lactozilla: Renderer switching
|
||||||
if (needpatchrecache)
|
if (needpatchrecache)
|
||||||
|
@ -1196,6 +1185,34 @@ void Y_Ticker(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Y_DetermineIntermissionType
|
||||||
|
//
|
||||||
|
// Determines the intermission type from the current gametype.
|
||||||
|
//
|
||||||
|
void Y_DetermineIntermissionType(void)
|
||||||
|
{
|
||||||
|
// set to int_none initially
|
||||||
|
intertype = int_none;
|
||||||
|
|
||||||
|
if (intermissiontypes[gametype] != int_none)
|
||||||
|
intertype = intermissiontypes[gametype];
|
||||||
|
else if (gametype == GT_COOP)
|
||||||
|
intertype = (G_IsSpecialStage(gamemap)) ? int_spec : int_coop;
|
||||||
|
else if (gametype == GT_TEAMMATCH)
|
||||||
|
intertype = int_teammatch;
|
||||||
|
else if (gametype == GT_MATCH
|
||||||
|
|| gametype == GT_TAG
|
||||||
|
|| gametype == GT_HIDEANDSEEK)
|
||||||
|
intertype = int_match;
|
||||||
|
else if (gametype == GT_RACE)
|
||||||
|
intertype = int_race;
|
||||||
|
else if (gametype == GT_COMPETITION)
|
||||||
|
intertype = int_comp;
|
||||||
|
else if (gametype == GT_CTF)
|
||||||
|
intertype = int_ctf;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Y_StartIntermission
|
// Y_StartIntermission
|
||||||
//
|
//
|
||||||
|
@ -1217,12 +1234,11 @@ void Y_StartIntermission(void)
|
||||||
if (!multiplayer)
|
if (!multiplayer)
|
||||||
{
|
{
|
||||||
timer = 0;
|
timer = 0;
|
||||||
|
|
||||||
intertype = (G_IsSpecialStage(gamemap)) ? int_spec : int_coop;
|
intertype = (G_IsSpecialStage(gamemap)) ? int_spec : int_coop;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cv_inttime.value == 0 && gametype == GT_COOP)
|
if (cv_inttime.value == 0 && ((intertype == int_coop) || (intertype == int_spec)))
|
||||||
timer = 0;
|
timer = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1231,23 +1247,6 @@ void Y_StartIntermission(void)
|
||||||
if (!timer)
|
if (!timer)
|
||||||
timer = 1;
|
timer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intermissiontypes[gametype] != int_none)
|
|
||||||
intertype = intermissiontypes[gametype];
|
|
||||||
else if (gametype == GT_COOP)
|
|
||||||
intertype = (G_IsSpecialStage(gamemap)) ? int_spec : int_coop;
|
|
||||||
else if (gametype == GT_TEAMMATCH)
|
|
||||||
intertype = int_teammatch;
|
|
||||||
else if (gametype == GT_MATCH
|
|
||||||
|| gametype == GT_TAG
|
|
||||||
|| gametype == GT_HIDEANDSEEK)
|
|
||||||
intertype = int_match;
|
|
||||||
else if (gametype == GT_RACE)
|
|
||||||
intertype = int_race;
|
|
||||||
else if (gametype == GT_COMPETITION)
|
|
||||||
intertype = int_comp;
|
|
||||||
else if (gametype == GT_CTF)
|
|
||||||
intertype = int_ctf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We couldn't display the intermission even if we wanted to.
|
// We couldn't display the intermission even if we wanted to.
|
||||||
|
|
|
@ -13,11 +13,15 @@ extern boolean usebuffer;
|
||||||
|
|
||||||
void Y_IntermissionDrawer(void);
|
void Y_IntermissionDrawer(void);
|
||||||
void Y_Ticker(void);
|
void Y_Ticker(void);
|
||||||
|
|
||||||
void Y_StartIntermission(void);
|
void Y_StartIntermission(void);
|
||||||
void Y_EndIntermission(void);
|
void Y_EndIntermission(void);
|
||||||
|
|
||||||
void Y_ConsiderScreenBuffer(void);
|
void Y_ConsiderScreenBuffer(void);
|
||||||
void Y_CleanupScreenBuffer(void);
|
void Y_CleanupScreenBuffer(void);
|
||||||
|
|
||||||
|
void Y_DetermineIntermissionType(void);
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
int_none,
|
int_none,
|
||||||
|
|
Loading…
Reference in a new issue