From: Mario Date: Sat, 4 May 2013 22:59:10 +0000 (+1000) Subject: Fix spectating X-Git-Tag: xonotic-v0.7.0~60^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec537e3b9fc136112b93ed956e1d764fe8c06cab;p=xonotic%2Fxonotic-data.pk3dir.git Fix spectating --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 26393d79c..84bbd1896 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -625,11 +625,16 @@ void PutClientInServer (void) // reset player keys self.itemkeys = 0; + // player is dead and becomes observer + // FIXME fix LMS scoring for new system + if(g_lms) + { + if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0) + self.classname = "observer"; + } + if((g_arena && !self.spawned) || (g_ca && !allowed_to_spawn)) self.classname = "observer"; - - if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0) - self.classname = "observer"; if(gameover) self.classname = "observer"; @@ -1385,7 +1390,7 @@ void ClientConnect (void) JoinBestTeam(self, FALSE, FALSE); // if the team number is valid, keep it - if(autocvar_g_campaign || self.team_forced < 0) { + if((autocvar_sv_spectate == 1) || autocvar_g_campaign || self.team_forced < 0) { self.classname = "observer"; } else { if(teamplay)