mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fixed: Custom automap colors were not invalidated on restart.
- fixed: D_DoomMain has 3 calls to D_DoomLoop but only the main call of these was capable of a clean restart.
This commit is contained in:
parent
5117b32431
commit
30cbce051e
3 changed files with 43 additions and 32 deletions
|
@ -473,6 +473,11 @@ static AMColorset AMMod;
|
||||||
static AMColorset AMModOverlay;
|
static AMColorset AMModOverlay;
|
||||||
|
|
||||||
|
|
||||||
|
void AM_ClearColorsets()
|
||||||
|
{
|
||||||
|
AMModOverlay.defined = false;
|
||||||
|
AMMod.defined = false;
|
||||||
|
}
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -27,6 +27,7 @@ class FSerializer;
|
||||||
|
|
||||||
|
|
||||||
void AM_StaticInit();
|
void AM_StaticInit();
|
||||||
|
void AM_ClearColorsets(); // reset data for a restart.
|
||||||
|
|
||||||
// Called by main loop.
|
// Called by main loop.
|
||||||
bool AM_Responder (event_t* ev, bool last);
|
bool AM_Responder (event_t* ev, bool last);
|
||||||
|
|
|
@ -2592,44 +2592,48 @@ void D_DoomMain (void)
|
||||||
G_DeferedPlayDemo (v);
|
G_DeferedPlayDemo (v);
|
||||||
D_DoomLoop (); // never returns
|
D_DoomLoop (); // never returns
|
||||||
}
|
}
|
||||||
|
else
|
||||||
v = Args->CheckValue ("-timedemo");
|
|
||||||
if (v)
|
|
||||||
{
|
{
|
||||||
G_TimeDemo (v);
|
v = Args->CheckValue("-timedemo");
|
||||||
D_DoomLoop (); // never returns
|
if (v)
|
||||||
}
|
|
||||||
|
|
||||||
if (gameaction != ga_loadgame && gameaction != ga_loadgamehidecon)
|
|
||||||
{
|
|
||||||
if (autostart || netgame)
|
|
||||||
{
|
{
|
||||||
// Do not do any screenwipes when autostarting a game.
|
G_TimeDemo(v);
|
||||||
if (!Args->CheckParm("-warpwipe"))
|
D_DoomLoop(); // never returns
|
||||||
{
|
|
||||||
NoWipe = TICRATE;
|
|
||||||
}
|
|
||||||
CheckWarpTransMap (startmap, true);
|
|
||||||
if (demorecording)
|
|
||||||
G_BeginRecording (startmap);
|
|
||||||
G_InitNew (startmap, false);
|
|
||||||
if (StoredWarp.IsNotEmpty())
|
|
||||||
{
|
|
||||||
AddCommandString(StoredWarp.LockBuffer());
|
|
||||||
StoredWarp = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
D_StartTitle (); // start up intro loop
|
if (gameaction != ga_loadgame && gameaction != ga_loadgamehidecon)
|
||||||
|
{
|
||||||
|
if (autostart || netgame)
|
||||||
|
{
|
||||||
|
// Do not do any screenwipes when autostarting a game.
|
||||||
|
if (!Args->CheckParm("-warpwipe"))
|
||||||
|
{
|
||||||
|
NoWipe = TICRATE;
|
||||||
|
}
|
||||||
|
CheckWarpTransMap(startmap, true);
|
||||||
|
if (demorecording)
|
||||||
|
G_BeginRecording(startmap);
|
||||||
|
G_InitNew(startmap, false);
|
||||||
|
if (StoredWarp.IsNotEmpty())
|
||||||
|
{
|
||||||
|
AddCommandString(StoredWarp.LockBuffer());
|
||||||
|
StoredWarp = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
D_StartTitle(); // start up intro loop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (demorecording)
|
||||||
|
{
|
||||||
|
G_BeginRecording(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
atterm(D_QuitNetGame); // killough
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (demorecording)
|
|
||||||
{
|
|
||||||
G_BeginRecording (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
atterm (D_QuitNetGame); // killough
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2643,7 +2647,7 @@ void D_DoomMain (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
D_DoomLoop (); // this only returns if a 'restart' CCMD is given.
|
D_DoomLoop (); // this only returns if a 'restart' CCMD is given.
|
||||||
|
maxberestart:
|
||||||
//
|
//
|
||||||
// Clean up after a restart
|
// Clean up after a restart
|
||||||
//
|
//
|
||||||
|
@ -2654,6 +2658,7 @@ void D_DoomMain (void)
|
||||||
|
|
||||||
M_ClearMenus(); // close menu if open
|
M_ClearMenus(); // close menu if open
|
||||||
F_EndFinale(); // If an intermission is active, end it now
|
F_EndFinale(); // If an intermission is active, end it now
|
||||||
|
AM_ClearColorsets();
|
||||||
|
|
||||||
// clean up game state
|
// clean up game state
|
||||||
ST_Clear();
|
ST_Clear();
|
||||||
|
|
Loading…
Reference in a new issue