mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add sv_solo_server for easier solo servers (also working for tunezones finally)
This commit is contained in:
parent
c9b4687cce
commit
bba82712e0
|
@ -318,6 +318,7 @@ MACRO_CONFIG_INT(SvRankCheats, sv_rank_cheats, 0, 0, 1, CFGFLAG_SERVER, "Enable
|
|||
MACRO_CONFIG_INT(SvSpoofProtection, sv_spoof_protection, 0, 0, 1, CFGFLAG_SERVER, "Enable spoof protection")
|
||||
MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_SERVER, "Shutdown server as soon as noone is on it anymore")
|
||||
MACRO_CONFIG_INT(SvKillProtection, sv_kill_protection, 20, 0, 9999, CFGFLAG_SERVER, "0 - Disable, 1-9999 minutes")
|
||||
MACRO_CONFIG_INT(SvSoloServer, sv_solo_server, 0, 0, 1, CFGFLAG_SERVER, "Set server to solo mode (no player interactions, has to be set before loading the map)")
|
||||
MACRO_CONFIG_STR(SvClientSuggestion, sv_client_suggestion, 128, "Get the client from ddnet.tw to use all features on DDNet", CFGFLAG_SERVER, "Broadcast to display to players without DDNet client")
|
||||
//MACRO_CONFIG_STR(SvClientSuggestionOld, sv_client_suggestion_old, 128, "Your client version is old. Update it on ddnet.tw for new features!", CFGFLAG_SERVER, "Broadcast to display to players with an old version of DDNet client")
|
||||
|
||||
|
|
|
@ -2288,6 +2288,8 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
|
|||
g_Config.m_SvOldTeleportHook = 0;
|
||||
g_Config.m_SvOldTeleportWeapons = 0;
|
||||
g_Config.m_SvTeleportHoldHook = 0;
|
||||
g_Config.m_SvTeam = 1;
|
||||
g_Config.m_SvShowOthersDefault = 0;
|
||||
}
|
||||
|
||||
Console()->ExecuteFile(g_Config.m_SvResetFile);
|
||||
|
@ -2309,6 +2311,21 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
|
|||
m_pController = new CGameControllerDDRace(this);
|
||||
((CGameControllerDDRace*)m_pController)->m_Teams.Reset();
|
||||
|
||||
if(g_Config.m_SvSoloServer)
|
||||
{
|
||||
g_Config.m_SvTeam = 3;
|
||||
g_Config.m_SvShowOthersDefault = 1;
|
||||
|
||||
Tuning()->Set("player_collision", 0);
|
||||
Tuning()->Set("player_hooking", 0);
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
TuningList()[i].Set("player_collision", 0);
|
||||
TuningList()[i].Set("player_hooking", 0);
|
||||
}
|
||||
}
|
||||
|
||||
// delete old score object
|
||||
if(m_pScore)
|
||||
delete m_pScore;
|
||||
|
|
Loading…
Reference in a new issue