From a7829e92ab32fb6859749938a2cd1294fda41d50 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 30 Aug 2011 16:03:54 +0200 Subject: [PATCH] undo unintentional changes; restrict CA spectators by default --- defaultXonotic.cfg | 2 +- qcsrc/server/cl_client.qc | 45 ++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index e7d0ed257..631731f78 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -808,7 +808,7 @@ set g_arena_powerups 0 "enables powerups (superhealth, strength and shield), whi set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round." set g_ca_point_limit 10 "point limit 10 is standard for clan arena" set g_ca_point_leadlimit 0 -set g_ca_spectate_enemies 1 "Allow spectating enemy player by dead player during clan arena games." +set g_ca_spectate_enemies 0 "Allow spectating enemy player by dead player during clan arena games." set g_ca_warmup 10 "how long the players will have time to run around the map before the round starts" // onslaught diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index a146e183c..598c6740f 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2396,29 +2396,30 @@ float SpectateNext() { if (other) self.enemy = other; - + if(self.enemy.classname == "player") { - if(self.enemy.vehicle) - { - msg_entity = self; - WriteByte(MSG_ONE, SVC_SETVIEWPORT); - WriteEntity(MSG_ONE, self.enemy); - //stuffcmd(self, "set viewsize $tmpviewsize \n"); - self.movetype = MOVETYPE_NONE; - accuracy_resend(self); - } - else - { - msg_entity = self; - WriteByte(MSG_ONE, SVC_SETVIEW); - WriteEntity(MSG_ONE, self.enemy); - //stuffcmd(self, "set viewsize $tmpviewsize \n"); - self.movetype = MOVETYPE_NONE; - accuracy_resend(self); - if(!SpectateUpdate()) - PutObserverInServer(); - } - return 1; + if(self.enemy.vehicle) + { + msg_entity = self; + WriteByte(MSG_ONE, SVC_SETVIEWPORT); + WriteEntity(MSG_ONE, self.enemy); + //stuffcmd(self, "set viewsize $tmpviewsize \n"); + self.movetype = MOVETYPE_NONE; + accuracy_resend(self); + } + else + { + msg_entity = self; + WriteByte(MSG_ONE, SVC_SETVIEW); + WriteEntity(MSG_ONE, self.enemy); + //stuffcmd(self, "set viewsize $tmpviewsize \n"); + self.movetype = MOVETYPE_NONE; + accuracy_resend(self); + + if(!SpectateUpdate()) + PutObserverInServer(); + } + return 1; } else { return 0; } -- 2.39.2