From: terencehill Date: Sat, 7 Jan 2012 21:29:29 +0000 (+0100) Subject: The ca code doesn't use the field spawned so don't check it X-Git-Tag: xonotic-v0.6.0~42^2~7^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fe03dd6f2b4a9a45433961dca9ab51432da0fe64;p=xonotic%2Fxonotic-data.pk3dir.git The ca code doesn't use the field spawned so don't check it Also fix a typo in a comment --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 7bf685e25..08d513fcf 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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; diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 5a7eb03ff..4f2a7456c 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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")) {