change many uses of the teamplay cvar to teams_matter
authorRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 13:53:53 +0000 (14:53 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 13:53:53 +0000 (14:53 +0100)
qcsrc/server/autocvars.qh
qcsrc/server/bot/bot.qc
qcsrc/server/monsters/mode_management.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_tuba.qc

index 36334b2..6d79ebe 100644 (file)
@@ -1,3 +1,4 @@
 float autocvar_sv_cheats;
 float autocvar_g_bastet;
+float autocvar_teamplay;
 var float autocvar_g_movement_highspeed = 1;
index fc578c3..a784ef4 100644 (file)
@@ -563,7 +563,7 @@ void bot_serverframe()
        // But don't remove bots immediately on level change, as the real players
        // usually haven't rejoined yet
        bots_would_leave = FALSE;
-       if (autocvar_teamplay && cvar("bot_vs_human") && (c3==-1 && c4==-1))
+       if (teams_matter && cvar("bot_vs_human") && (c3==-1 && c4==-1))
                bots = min(ceil(fabs(cvar("bot_vs_human")) * activerealplayers), maxclients - realplayers);
        else if ((realplayers || cvar("bot_join_empty") || (currentbots > 0 && time < 5)))
        {
index f85bbcf..9014f09 100644 (file)
@@ -143,7 +143,7 @@ void(float c) SV_ChangeTeam =
        if (mode_shirtmustmatchpants || shirt < 0)
                shirt = pants;
        setcolor(self, pants + shirt * 16);
-       if (pants != old && old >= 0 && autocvar_teamplay && deathmatch)
+       if (pants != old && old >= 0 && teams_matter && deathmatch)
        {
                T_Damage(self, self, self, 0, 0, " changed teams", DT_TELEFRAG, self.origin, '0 0 0', Obituary_Generic);
                self.frags = 0;
index 4872977..1df4699 100644 (file)
@@ -33,7 +33,7 @@ float check_tdeath(entity player, vector org, vector telefragmin, vector telefra
        {
                TDEATHLOOP(org)
                {
-                       if not(autocvar_teamplay && cvar("g_telefrags_teamplay") && head.team == player.team)
+                       if not(teams_matter && cvar("g_telefrags_teamplay") && head.team == player.team)
                                if(head.classname == "player")
                                        if(head.health >= 1)
                                                return 1;
@@ -48,7 +48,7 @@ void tdeath(entity player, entity teleporter, entity telefragger, vector telefra
        {
                if (player.classname == "player" && player.health >= 1)
                {
-                       if not(autocvar_teamplay && cvar("g_telefrags_teamplay") && head.team == player.team)
+                       if not(teams_matter && cvar("g_telefrags_teamplay") && head.team == player.team)
                        {
                                if(head.classname == "player")
                                        if(head.health >= 1)
index f4738fa..3561c8c 100644 (file)
@@ -609,7 +609,7 @@ void turret_think()
     self.nextthink = time + self.ticrate;
 
     // ONS uses somewhat backwards linking.
-    if (autocvar_teamplay)
+    if (teams_matter)
     {
         if not (g_onslaught)
             if (self.target)
@@ -918,7 +918,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
         if not (self.team)
             self.team = 14; // Assume turrets are on the defending side if not explicitly set otehrwize
     }
-    else if not (autocvar_teamplay)
+    else if not (teams_matter)
                self.team = MAX_SHOT_DISTANCE; // Group all turrets into the same team, so they dont kill eachother.
        else if(g_onslaught && self.targetname)
        {
index bd75971..424093b 100644 (file)
@@ -295,7 +295,7 @@ void raptor_enter()
     if (clienttype(other) != CLIENTTYPE_REAL)
         return;
 
-    if(autocvar_teamplay)
+    if(teams_matter)
         if(self.team)
             if(self.team != other.team)
                 return;
index ff43dea..5bbc67c 100644 (file)
@@ -430,7 +430,7 @@ void spiderbot_enter()
 
     self.colormod = self.tur_head.colormod = '0 0 0';
 
-    if(autocvar_teamplay)
+    if(teams_matter)
     if(self.team)
     if(self.team != other.team)
         return;
@@ -533,7 +533,7 @@ void spiderbot_exit(float eject)
        self.colormap            = 1024;
        self.tur_head.colormap   = 1024;
 
-    if not (autocvar_teamplay)
+    if not (teams_matter)
         self.team                = 0;
     else
     {
@@ -697,7 +697,7 @@ void vewhicle_spiderbot_dinit()
     tracebox(self.origin + '0 0 100', spiderbot_MIN, spiderbot_MAX, self.origin - '0 0 10000', MOVE_WORLDONLY, self);
     setorigin(self.spiderbot_spawnpnt,trace_endpos);
 
-    if(self.team && !autocvar_teamplay)
+    if(self.team && !teams_matter)
         self.team = 0;
     else
         self.spiderbot_spawnpnt.team = self.team;
index 93e8bfd..2c997cd 100644 (file)
@@ -43,7 +43,7 @@ void W_MinstaNex_Attack (void)
        // teamcolor / hit beam effect
        vector v;
        v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-       if(autocvar_teamplay)
+       if(teams_matter)
        {
            switch(self.team)
            {
index a1b764d..c9cfdc4 100644 (file)
@@ -46,7 +46,7 @@ float Tuba_GetNote(entity pl, float hittype)
        
        // we support two kinds of tubas, those tuned in Eb and those tuned in C
        // kind of tuba currently is player slot number, or team number if in
-       // autocvar_teamplay
+       // teamplay
        // that way, holes in the range of notes are "plugged"
        if(teams_matter)
        {