]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix Arena spectator status
authorRudolf Polzer <divverent@xonotic.org>
Tue, 29 Jan 2013 09:02:06 +0000 (10:02 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 29 Jan 2013 09:02:06 +0000 (10:02 +0100)
qcsrc/server/cl_client.qc
qcsrc/server/scores.qc

index 062d4474d73490974e1cad0c56f871bc5bab79ea..c15f82dec93f093cce1ecf3dabb88f0da369e931 100644 (file)
@@ -511,11 +511,13 @@ void PutObserverInServer (void)
        {
                if(self.version_mismatch)
                {
+                       self.frags = FRAGS_SPECTATOR;
                        Spawnqueue_Unmark(self);
                        Spawnqueue_Remove(self);
                }
                else
                {
+                       self.frags = FRAGS_LMS_LOSER;
                        Spawnqueue_Insert(self);
                }
        }
@@ -534,7 +536,7 @@ void PutObserverInServer (void)
                else
                        self.frags = FRAGS_SPECTATOR;
        }
-       else if(g_race)
+       else if((g_race && g_race_qualifying) || g_cts)
        {
                if(PlayerScore_Add(e, SP_RACE_FASTEST, 0))
                        self.frags = FRAGS_LMS_LOSER;
index 1adfb0cc50914d69829073810d697d24bf45d233..9062b298ee8debbcfa8cce7a5b399db851864684 100644 (file)
@@ -248,18 +248,18 @@ float PlayerScore_SendEntity(entity to, float sendflags)
        return TRUE;
 }
 
-void PlayerScore_Clear(entity player)
+float PlayerScore_Clear(entity player)
 {
        entity sk;
        float i;
 
        if(teamscores_entities_count)
-               return;
+               return 0;
 
-       if(g_lms) return;
-       if(g_arena || g_ca) return;
-       if(g_cts) return; // in CTS, you don't lose score by observing
-       if(g_race && g_race_qualifying) return; // in qualifying, you don't lose score by observing
+       if(g_lms) return 0;
+       if(g_arena || g_ca) return 0;
+       if(g_cts) return 0; // in CTS, you don't lose score by observing
+       if(g_race && g_race_qualifying) return 0; // in qualifying, you don't lose score by observing
 
        sk = player.scorekeeper;
        for(i = 0; i < MAX_SCORE; ++i)
@@ -269,6 +269,8 @@ void PlayerScore_Clear(entity player)
                                sk.SendFlags |= pow(2, i);
                sk.(scores[i]) = 0;
        }
+
+       return 1;
 }
 
 void Score_ClearAll()