From: Rudolf Polzer Date: Tue, 29 Jan 2013 09:02:06 +0000 (+0100) Subject: fix Arena spectator status X-Git-Tag: xonotic-v0.7.0~108^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5c9da9cf4d04a96e6f350f8c521dd34d0edfba3f;p=xonotic%2Fxonotic-data.pk3dir.git fix Arena spectator status --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 062d4474d..c15f82dec 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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; diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 1adfb0cc5..9062b298e 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -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()