]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/main.qc
Implement autopause for empty dedicated servers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / main.qc
index 2b29422b8969362356b6a552106158c9b881d0e7..bb75f5aa2f39e0acfd22eb55754db159a3b3eb18 100644 (file)
@@ -186,6 +186,12 @@ void CreatureFrame_All()
        });
 }
 
+void Pause_TryPause_Dedicated(entity this)
+{
+       if (player_count == 0)
+               setpause(1);
+}
+
 void Pause_TryPause(bool ispaused)
 {
        int n = 0;
@@ -268,7 +274,6 @@ Called before each frame by the server
 
 bool game_delay_last;
 
-bool autocvar_sv_autopause = false;
 void systems_update();
 void sys_phys_update(entity this, float dt);
 void StartFrame()