RestartManager: move default map set

This commit is contained in:
hubdom 2020-08-13 01:06:23 +02:00
parent 3539b2cb91
commit 03a5f2ee8e

View File

@ -39,9 +39,7 @@ public void OnPluginStart()
AutoExecConfig(true); AutoExecConfig(true);
GetUptimeIfControlledRestart(); GetUptimeIfControlledRestart();
char sDefaultMap[64];
g_cvarDefaultMap.GetString(sDefaultMap, sizeof(sDefaultMap));
SetStartMap(sDefaultMap);
RegServerCmd("changelevel", BlockMapSwitch); RegServerCmd("changelevel", BlockMapSwitch);
@ -49,6 +47,16 @@ public void OnPluginStart()
CreateTimer(60.0, ForceRestartMessage, _, TIMER_REPEAT); CreateTimer(60.0, ForceRestartMessage, _, TIMER_REPEAT);
} }
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnConfigsExecuted()
{
char sDefaultMap[64];
g_cvarDefaultMap.GetString(sDefaultMap, sizeof(sDefaultMap));
SetStartMap(sDefaultMap);
}
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// Purpose: // Purpose:
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------