]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Merge branch 'master' into terencehill/arena_and_ca_fixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index c4cc090c3b289adcfd77a8fd71ba6733f13c6a93..f8289317d87d9368126b0c985c531b75cb4762cc 100644 (file)
@@ -196,14 +196,17 @@ void StartFrame (void)
        if(sys_frametime <= 0)
                sys_frametime = 1.0 / 60.0; // somewhat safe fallback
 
-       if (timeoutStatus == 1) // just before the timeout (when timeoutStatus will be 2)
+       if (timeout_status == TIMEOUT_LEADTIME) // just before the timeout (when timeout_status will be TIMEOUT_ACTIVE)
                orig_slowmo = autocvar_slowmo; // slowmo will be restored after the timeout
 
        skill = autocvar_skill;
 
+       count_players();
+       if(g_ca || g_freezetag)
+               count_alive_players();
+       Arena_Warmup();
        Spawnqueue_Check();
 
-
        // detect when the pre-game countdown (if any) has ended and the game has started
        game_delay = (time < game_starttime) ? TRUE : FALSE;
 
@@ -233,6 +236,8 @@ void StartFrame (void)
 
        FOR_EACH_PLAYER(self)
                self.porto_forbidden = max(0, self.porto_forbidden - 1);
+
+       MUTATOR_CALLHOOK(SV_StartFrame);
 }
 
 .vector originjitter;
@@ -243,8 +248,9 @@ void StartFrame (void)
 float DoesQ3ARemoveThisEntity();
 void SV_OnEntityPreSpawnFunction()
 {
-       if(self.gametypefilter != "")
-       if not(isGametypeInFilter(game, teamplay, have_team_spawns, self.gametypefilter))
+       if (self)
+       if (self.gametypefilter != "")
+       if not(isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter))
        {
                remove(self);
                return;