]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix spectating
authorMario <mario.mario@y7mail.com>
Sat, 4 May 2013 22:59:10 +0000 (08:59 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 4 May 2013 22:59:10 +0000 (08:59 +1000)
qcsrc/server/cl_client.qc

index 26393d79c6b07280ae05f8fd463fe7952857ddb7..84bbd1896f50b40c4f5b5ac462398631dcc2e7e0 100644 (file)
@@ -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)