]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
The ca code doesn't use the field spawned so don't check it
authorterencehill <piuntn@gmail.com>
Sat, 7 Jan 2012 21:29:29 +0000 (22:29 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 7 Jan 2012 22:38:24 +0000 (23:38 +0100)
Also fix a typo in a comment

qcsrc/server/cl_client.qc
qcsrc/server/command/cmd.qc

index 7bf685e252ce55dfd66b637fda2aa56deb40943f..08d513fcf49b64c24039aab7b0833bc36ac7de2b 100644 (file)
@@ -655,7 +655,7 @@ void PutClientInServer (void)
                WriteByte(MSG_ONE, SVC_SETVIEW);
                WriteEntity(MSG_ONE, self);
        }
-       
+
        // reset player keys
        self.itemkeys = 0;
 
@@ -667,8 +667,7 @@ void PutClientInServer (void)
                        self.classname = "observer";
        }
 
-       if(g_arena || (g_ca && !allowed_to_spawn))
-       if(!self.spawned)
+       if((g_arena && !self.spawned) || (g_ca && !allowed_to_spawn))
                self.classname = "observer";
 
        if(gameover)
@@ -826,13 +825,12 @@ void PutClientInServer (void)
                self.lastrocket = world; // stop rocket guiding, no revenge from the grave!
                self.lastteleporttime = time; // prevent insane speeds due to changing origin
         self.hud = HUD_NORMAL;
-        
+
                if(g_arena)
                {
                        Spawnqueue_Remove(self);
                        Spawnqueue_Mark(self);
                }
-
                else if(g_ca)
                        self.caplayer = 1;
 
index 5a7eb03ff6f8eab6d15efb825162b5bec52277da..4f2a7456cc64f5034ecd9c4d44294f7e85f7d66a 100644 (file)
@@ -445,7 +445,7 @@ void ClientCommand_spectate(float request)
                                if(self.classname == "player" && autocvar_sv_spectate == 1) 
                                        ClientKill_TeamChange(-2); // observe
                                
-                               // in CA, allow a dead player to move to spectatators (without that, caplayer!=0 will be moved back to the player list)
+                               // in CA, allow a dead player to move to spectators (without that, caplayer!=0 will be moved back to the player list)
                                // note: if arena game mode is ever done properly, this needs to be removed.
                                if(g_ca && self.caplayer && (self.classname == "spectator" || self.classname == "observer"))
                                {