]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_ca.qc
Merge branch 'master' into Mario/bulldozer
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_ca.qc
index 88e56bb9d208fc8ce49d397c7341d2c86a9d8dab..725569bfff6469745c55a56ffcce910131287071 100644 (file)
@@ -9,17 +9,17 @@ void ca_Initialize();
 
 REGISTER_MUTATOR(ca, false)
 {
-       ActivateTeamplay();
-       SetLimits(autocvar_g_ca_point_limit, autocvar_g_ca_point_leadlimit, -1, -1);
-
-       if (autocvar_g_ca_team_spawns)
-               have_team_spawns = -1; // request team spawns
-
        MUTATOR_ONADD
        {
                if (time > 1) // game loads at time 1
                        error("This is a game type and it cannot be added at runtime.");
                ca_Initialize();
+
+               ActivateTeamplay();
+               SetLimits(autocvar_g_ca_point_limit, autocvar_g_ca_point_leadlimit, -1, -1);
+
+               if (autocvar_g_ca_team_spawns)
+                       have_team_spawns = -1; // request team spawns
        }
 
        MUTATOR_ONREMOVE
@@ -237,7 +237,7 @@ MUTATOR_HOOKFUNCTION(ca, PutClientInServer)
        if(!allowed_to_spawn)
        if(IS_PLAYER(self)) // this is true even when player is trying to join
        {
-               self.classname = "observer";
+               self.classname = STR_OBSERVER;
                if(self.jointime != time) //not when connecting
                if(!self.caplayer)
                {
@@ -263,7 +263,7 @@ MUTATOR_HOOKFUNCTION(ca, reset_map_players)
                }
                if(self.caplayer)
                {
-                       self.classname = "player";
+                       self.classname = STR_PLAYER;
                        self.caplayer = 1;
                        PutClientInServer();
                }
@@ -273,7 +273,7 @@ MUTATOR_HOOKFUNCTION(ca, reset_map_players)
 
 MUTATOR_HOOKFUNCTION(ca, ClientConnect)
 {SELFPARAM();
-       self.classname = "observer";
+       self.classname = STR_OBSERVER;
        return 1;
 }