]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Add Arena to the mutator system, making use of round_handler. Also add support for...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index fda52868a805b076199838ae33fe82479fb67698..da4ed37a9b803858b779cec27d025d5e1522661e 100644 (file)
@@ -401,19 +401,7 @@ void PutObserverInServer (void)
                WriteEntity(MSG_ONE, self);
        }
 
-       if(g_arena)
-       {
-               if(self.version_mismatch)
-               {
-                       Spawnqueue_Unmark(self);
-                       Spawnqueue_Remove(self);
-               }
-               else
-               {
-                       Spawnqueue_Insert(self);
-               }
-       }
-       else if(g_lms)
+       if(g_lms)
        {
                // Only if the player cannot play at all
                if(PlayerScore_Add(self, SP_LMS_RANK, 0) == 666)
@@ -654,8 +642,6 @@ void PutClientInServer (void)
                if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0)
                        self.classname = "observer";
        }
-       else if(g_arena && !self.spawned)
-               self.classname = "observer";
 
        MUTATOR_CALLHOOK(PutClientInServer);
 
@@ -822,12 +808,6 @@ void PutClientInServer (void)
                self.lastteleporttime = time; // prevent insane speeds due to changing origin
         self.hud = HUD_NORMAL;
 
-               if(g_arena)
-               {
-                       Spawnqueue_Remove(self);
-                       Spawnqueue_Mark(self);
-               }
-
                self.event_damage = PlayerDamage;
 
                self.bot_attack = TRUE;
@@ -1240,19 +1220,12 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
 
 void ClientKill (void)
 {
-       if (gameover)
-               return;
+       if(gameover) return;
+       if(g_ca && player_count == 1) return;
+       if(self.player_blocked) return;
+       if(self.freezetag_frozen) return;
 
-       if((g_arena || g_ca) && ((champion && champion.classname == "player" && player_count > 1) || player_count == 1)) // don't allow a kill in this case either
-       {
-               // do nothing
-       }
-    else if(self.freezetag_frozen)
-    {
-        // do nothing
-    }
-       else
-               ClientKill_TeamChange(0);
+       ClientKill_TeamChange(0);
 }
 
 void CTS_ClientKill (entity e) // silent version of ClientKill, used when player finishes a CTS run. Useful to prevent cheating by running back to the start line and starting out with more speed
@@ -1646,12 +1619,6 @@ void ClientDisconnect (void)
 
        bot_relinkplayerlist();
 
-       if(g_arena)
-       {
-               Spawnqueue_Unmark(self);
-               Spawnqueue_Remove(self);
-       }
-
        accuracy_free(self);
        ClientData_Detach();
        PlayerScore_Detach(self);
@@ -2547,10 +2514,7 @@ void PlayerPreThink (void)
        self.stat_allow_oldnexbeam = autocvar_g_allow_oldnexbeam;
        self.stat_leadlimit = autocvar_leadlimit;
 
-       if(g_arena)
-               self.stat_respawn_time = 0;
-       else
-               self.stat_respawn_time = self.respawn_time;
+       self.stat_respawn_time = self.respawn_time;
 
        if(frametime)
        {