mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +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;
|
||||
|
||||
if (!(netgame || multiplayer) || !G_CoopGametype())
|
||||
if (!(netgame || multiplayer) || !(gametyperules & GTR_FRIENDLY))
|
||||
return;
|
||||
|
||||
if (cv_exitmove.value)
|
||||
|
|
|
@ -3180,7 +3180,7 @@ void G_ExitLevel(void)
|
|||
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"));
|
||||
|
||||
// Remove CEcho text on round end.
|
||||
|
@ -3840,7 +3840,10 @@ static void G_DoCompleted(void)
|
|||
if (nextmap < NUMMAPS && !mapheaderinfo[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_AfterIntermission();
|
||||
|
|
|
@ -4100,7 +4100,7 @@ void P_SetupSignExit(player_t *player)
|
|||
|
||||
if (!numfound
|
||||
&& !(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);
|
||||
|
||||
if (thing->state != &states[thing->info->spawnstate])
|
||||
|
@ -4131,7 +4131,7 @@ void P_SetupSignExit(player_t *player)
|
|||
|
||||
if (!numfound
|
||||
&& !(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);
|
||||
|
||||
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 (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)))
|
||||
sign = mo->target;
|
||||
else if ((player->powers[pw_carry] == CR_NIGHTSMODE)
|
||||
|
@ -11826,7 +11826,7 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
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;
|
||||
else
|
||||
P_DoPlayerExit(player);
|
||||
|
|
|
@ -229,8 +229,7 @@ static void Y_IntermissionTokenDrawer(void)
|
|||
//
|
||||
// Y_ConsiderScreenBuffer
|
||||
//
|
||||
// Can we copy the current screen
|
||||
// to a buffer?
|
||||
// Can we copy the current screen to a buffer?
|
||||
//
|
||||
void Y_ConsiderScreenBuffer(void)
|
||||
{
|
||||
|
@ -256,9 +255,7 @@ void Y_ConsiderScreenBuffer(void)
|
|||
//
|
||||
// Y_RescaleScreenBuffer
|
||||
//
|
||||
// Write the rescaled source picture,
|
||||
// to the destination picture that
|
||||
// has the current screen's resolutions.
|
||||
// Write the rescaled source picture, to the destination picture that has the current screen's resolutions.
|
||||
//
|
||||
static void Y_RescaleScreenBuffer(void)
|
||||
{
|
||||
|
@ -328,14 +325,6 @@ void Y_IntermissionDrawer(void)
|
|||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
if (intertype == int_none)
|
||||
{
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_IntermissionHUD();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (!usebuffer)
|
||||
// Lactozilla: Renderer switching
|
||||
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
|
||||
//
|
||||
|
@ -1217,12 +1234,11 @@ void Y_StartIntermission(void)
|
|||
if (!multiplayer)
|
||||
{
|
||||
timer = 0;
|
||||
|
||||
intertype = (G_IsSpecialStage(gamemap)) ? int_spec : int_coop;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cv_inttime.value == 0 && gametype == GT_COOP)
|
||||
if (cv_inttime.value == 0 && ((intertype == int_coop) || (intertype == int_spec)))
|
||||
timer = 0;
|
||||
else
|
||||
{
|
||||
|
@ -1231,23 +1247,6 @@ void Y_StartIntermission(void)
|
|||
if (!timer)
|
||||
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.
|
||||
|
|
|
@ -13,11 +13,15 @@ extern boolean usebuffer;
|
|||
|
||||
void Y_IntermissionDrawer(void);
|
||||
void Y_Ticker(void);
|
||||
|
||||
void Y_StartIntermission(void);
|
||||
void Y_EndIntermission(void);
|
||||
|
||||
void Y_ConsiderScreenBuffer(void);
|
||||
void Y_CleanupScreenBuffer(void);
|
||||
|
||||
void Y_DetermineIntermissionType(void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
int_none,
|
||||
|
|
Loading…
Reference in a new issue