]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Merge branch 'master' of /var/cache/git/xonotic/xonotic-data.pk3dir
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index 8ce4ebdae08e669358a80fbe70b872eba5825f23..e4ed89a85a2e7fb347dfbd3c153e6b287008de4a 100644 (file)
@@ -302,7 +302,6 @@ void cvar_changes_init()
                BADPREFIX("g_respawn_ghosts");
                BADPREFIX("g_voice_flood_");
                BADPREFIX("rcon_");
-               BADPREFIX("settemp_");
                BADPREFIX("sv_allowdownloads");
                BADPREFIX("sv_autodemo");
                BADPREFIX("sv_curl_");
@@ -373,7 +372,6 @@ void cvar_changes_init()
                BADCVAR("g_balance_kill_delay");
                BADCVAR("g_ca_point_leadlimit");
                BADCVAR("g_ctf_captimerecord_always");
-               BADCVAR("g_ctf_capture_leadlimit");
                BADCVAR("g_ctf_flag_capture_effects");
                BADCVAR("g_ctf_flag_glowtrails");
                BADCVAR("g_ctf_flag_pickup_effects");
@@ -388,6 +386,7 @@ void cvar_changes_init()
                BADCVAR("sv_allow_fullbright");
                BADCVAR("sv_checkforpacketsduringsleep");
                BADCVAR("sv_timeout");
+               BADPREFIX("sv_timeout_");
                BADCVAR("welcome_message_time");
                BADPREFIX("crypto_");
                BADPREFIX("g_chat_");
@@ -427,9 +426,7 @@ void cvar_changes_init()
                BADCVAR("g_balance_teams_force");
                BADCVAR("g_ban_sync_trusted_servers");
                BADCVAR("g_ban_sync_uri");
-               BADCVAR("g_ctf_capture_limit");
                BADCVAR("g_ctf_ignore_frags");
-               BADCVAR("g_ctf_win_mode");
                BADCVAR("g_domination_point_limit");
                BADCVAR("g_friendlyfire");
                BADCVAR("g_fullbrightitems");
@@ -489,6 +486,7 @@ void cvar_changes_init()
                BADCVAR("sys_ticrate");
                BADCVAR("teamplay_mode");
                BADCVAR("timelimit_override");
+               BADCVAR("g_spawnshieldtime");
                BADPREFIX("g_warmup_");
                BADPREFIX("sv_ready_restart_");
 
@@ -610,6 +608,10 @@ void spawnfunc___init_dedicated_server(void)
 
        self.classname = "worldspawn"; // safeguard against various stuff ;)
 
+       // needs to be done so early because of the constants they create
+       RegisterWeapons();
+       RegisterGametypes();
+
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 }
@@ -653,8 +655,9 @@ void spawnfunc_worldspawn (void)
                head = nextent(head);
        }
 
-       // needs to be done so early as they would still spawn
+       // needs to be done so early because of the constants they create
        RegisterWeapons();
+       RegisterGametypes();
 
        ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
 
@@ -987,7 +990,7 @@ void spawnfunc_light (void)
 
 string GetGametype()
 {
-       return GametypeNameFromType(game);
+       return MapInfo_Type_ToString(MapInfo_LoadedGametype);
 }
 
 string getmapname_stored;
@@ -1135,15 +1138,8 @@ void Map_Goto_SetFloat(float position)
        Map_Goto_SetStr(argv(position));
 }
 
-void GameResetCfg()
-{
-       // settings persist, except...
-       localcmd("\nsettemp_restore\n");
-}
-
 void Map_Goto(float reinit)
 {
-       GameResetCfg();
        MapInfo_LoadMap(getmapname_stored, reinit);
 }
 
@@ -1319,8 +1315,8 @@ float DoNextMapOverride(float reinit)
                }
        if(autocvar_lastlevel)
        {
-               GameResetCfg();
-               localcmd("set lastlevel 0\ntogglemenu\n");
+               cvar_settemp_restore();
+               localcmd("set lastlevel 0\ntogglemenu 1\n");
                alreadychangedlevel = TRUE;
                return TRUE;
        }
@@ -2958,14 +2954,11 @@ void RestoreGame()
        TargetMusic_RestoreGame();
 }
 
-void SV_Shutdown()
+void Shutdown()
 {
        entity e;
 
-       if(gameover > 1) // shutting down already?
-               return;
-
-       gameover = 2; // 2 = server shutting down
+       gameover = 2;
 
        if(world_initialized > 0)
        {