]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/arena.qc
Merge branch 'master' of ssh://git.xonotic.org/xonotic-data.pk3dir into savagex/plat...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / arena.qc
index 12f25fad50c26d31204b84510628a9d81ea99e37..5110d373b8a682e657e1a5f10201c2c91303dbba 100644 (file)
@@ -41,15 +41,15 @@ void reset_map(float dorespawn)
        entity oldself;
        oldself = self;
 
-       if(g_arena && cvar("g_arena_warmup"))
-               warmup = time + cvar("g_arena_warmup");
+       if(g_arena && autocvar_g_arena_warmup)
+               warmup = time + autocvar_g_arena_warmup;
        else if(g_ca) {
-               warmup = time + cvar("g_ca_warmup");
+               warmup = time + autocvar_g_ca_warmup;
                allowed_to_spawn = 1;
        }
        else if(g_freezetag)
        {
-               warmup = time + cvar("g_freezetag_warmup");
+               warmup = time + autocvar_g_freezetag_warmup;
        }
 
        lms_lowest_lives = 999;
@@ -137,7 +137,7 @@ void reset_map(float dorespawn)
        }
 
        if(g_keyhunt)
-               kh_Controller_SetThink(cvar("g_balance_keyhunt_delay_round")+(game_starttime - time), "", kh_StartRound);
+               kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round+(game_starttime - time), "", kh_StartRound);
 
        if(g_arena)
        if(champion && champion.classname == "player" && player_count > 1)
@@ -208,6 +208,7 @@ void Arena_Warmup()
 {
        float f;
        string msg;
+    entity e;
 
        if((!g_arena && !g_ca && !g_freezetag) || (g_arena && !arena_roundbased) || (time < game_starttime))
                return;
@@ -245,7 +246,8 @@ void Arena_Warmup()
                        else if(f == 1)
                                Announce("1");
 
-                       centerprint(self, msg);
+            FOR_EACH_PLAYER(e)
+                centerprint(e, msg);
                }
 
                if (g_arena) {
@@ -268,13 +270,13 @@ void Arena_Warmup()
                if(g_ca) {
                        ca_players = 0;
 
-                       FOR_EACH_PLAYER(self)
+            FOR_EACH_PLAYER(e)
                                ca_players += 1;
                }
-       }
 
-       if(self.classname == "player" && self.health > 0 && self.movetype == MOVETYPE_NONE)
-               self.movetype = MOVETYPE_WALK;
+        if(self.classname == "player" && self.health > 0 && self.movetype == MOVETYPE_NONE)
+            self.movetype = MOVETYPE_WALK;
+       }
 }
 
 void count_spawned_players()
@@ -384,7 +386,7 @@ void Spawnqueue_Check()
                return;
 
        if(g_ca) {
-               required_ca_players = max(2, fabs(cvar("bot_vs_human") + 1));
+               required_ca_players = max(2, fabs(autocvar_bot_vs_human + 1));
 
                if(ca_players < required_ca_players && (redspawned && bluespawned)) {
                        reset_map(TRUE);
@@ -402,7 +404,7 @@ void Spawnqueue_Check()
                                        strunzone(champion_name);
                                champion_name = strzone(champion.netname);
                        }
-                       else if((!redspawned && !bluespawned) || time - warmup > cvar("g_ca_round_timelimit")) {
+                       else if((!redspawned && !bluespawned) || time - warmup > autocvar_g_ca_round_timelimit) {
                                FOR_EACH_CLIENT(self) centerprint(self, strcat("^7Round tied.", "^7\n"));
                                next_round = time + 5;
                        }