mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
restartlevel: preserve last map's gametype
- gametype can be changed without changing gamemap, through the pause menu option
This commit is contained in:
parent
1b3c63f24a
commit
717dcf0209
4 changed files with 6 additions and 2 deletions
|
|
@ -244,6 +244,7 @@ char timedemo_csv_id[256];
|
|||
boolean timedemo_quit;
|
||||
|
||||
INT16 gametype = GT_RACE;
|
||||
INT16 g_lastgametype = GT_RACE;
|
||||
INT16 numgametypes = GT_FIRSTFREESLOT;
|
||||
|
||||
boolean forceresetplayers = false;
|
||||
|
|
@ -2965,7 +2966,7 @@ static void Command_RestartLevel(void)
|
|||
newencore = (cv_kartencore.value == 1) || encoremode;
|
||||
}
|
||||
|
||||
D_MapChange(gamemap, gametype, newencore, false, 0, false, false);
|
||||
D_MapChange(gamemap, g_lastgametype, newencore, false, 0, false, false);
|
||||
}
|
||||
|
||||
static void Handle_MapQueueSend(UINT16 newmapnum, UINT16 newgametype, boolean newencoremode)
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ struct gametype_t
|
|||
extern gametype_t *gametypes[MAXGAMETYPES+1];
|
||||
extern INT16 numgametypes;
|
||||
|
||||
extern INT16 gametype;
|
||||
extern INT16 gametype, g_lastgametype;
|
||||
|
||||
// Gametype rules
|
||||
enum GameTypeRules
|
||||
|
|
|
|||
|
|
@ -5126,6 +5126,7 @@ void G_InitNew(UINT8 pencoremode, INT32 map, boolean resetplayer, boolean skippr
|
|||
|
||||
g_reloadingMap = (map == gamemap);
|
||||
gamemap = map;
|
||||
g_lastgametype = gametype;
|
||||
|
||||
automapactive = false;
|
||||
imcontinuing = false;
|
||||
|
|
|
|||
|
|
@ -6436,6 +6436,7 @@ static void P_NetArchiveMisc(savebuffer_t *save, boolean resending)
|
|||
else
|
||||
WRITEINT16(save->p, gamestate);
|
||||
WRITEINT16(save->p, gametype);
|
||||
WRITEINT16(save->p, g_lastgametype);
|
||||
|
||||
{
|
||||
UINT32 pig = 0;
|
||||
|
|
@ -6622,6 +6623,7 @@ static boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
|
|||
G_SetGamestate(READINT16(save->p));
|
||||
|
||||
gametype = READINT16(save->p);
|
||||
g_lastgametype = READINT16(save->p);
|
||||
|
||||
{
|
||||
UINT32 pig = READUINT32(save->p);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue