mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add support for a reset file to execute on map change or reload
This commit is contained in:
parent
536fadd034
commit
7a29b07d4e
|
@ -203,6 +203,7 @@ MACRO_CONFIG_INT(SvPlasmaPerSec, sv_plasma_per_sec, 3, 0, 50, CFGFLAG_SERVER, "H
|
|||
MACRO_CONFIG_INT(SvVotePause, sv_vote_pause, 1, 0, 1, CFGFLAG_SERVER, "Allow voting to pause players (instead of moving to spectators)")
|
||||
MACRO_CONFIG_INT(SvVotePauseTime, sv_vote_pause_time, 10, 0, 360, CFGFLAG_SERVER, "The time (in seconds) players have to wait in pause when paused by vote")
|
||||
MACRO_CONFIG_INT(SvTuneReset, sv_tune_reset, 0, 0, 1, CFGFLAG_SERVER, "Whether tuning is reset after each map change or not")
|
||||
MACRO_CONFIG_STR(SvResetFile, sv_reset_file, 128, "reset.cfg", CFGFLAG_SERVER, "File to execute on map change or reload to set the default server settings")
|
||||
MACRO_CONFIG_INT(SvDDRaceTuneReset, sv_ddrace_tune_reset, 1, 0, 1, CFGFLAG_SERVER, "Whether DDRace tuning(sv_hit, Sv_Endless_Drag & Sv_Old_Laser) is reset after each map change or not")
|
||||
MACRO_CONFIG_INT(SvNamelessScore, sv_nameless_score, 0, 0, 1, CFGFLAG_SERVER, "Whether nameless tee has a score or not")
|
||||
MACRO_CONFIG_INT(SvTimeInBroadcastInterval, sv_time_in_broadcast_interval, 1, 0, 60, CFGFLAG_SERVER, "How often to update the broadcast time")
|
||||
|
|
|
@ -1857,6 +1857,8 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
|
|||
g_Config.m_SvOldLaser = 0;
|
||||
}
|
||||
|
||||
Console()->ExecuteFile(g_Config.m_SvResetFile);
|
||||
|
||||
char buf[512];
|
||||
str_format(buf, sizeof(buf), "data/maps/%s.cfg", g_Config.m_SvMap);
|
||||
Console()->ExecuteFile(buf);
|
||||
|
|
Loading…
Reference in a new issue