]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't count to total scores when in warmup
authorRudolf Polzer <divverent@alientrap.org>
Thu, 22 Dec 2011 16:10:27 +0000 (17:10 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 22 Dec 2011 16:10:27 +0000 (17:10 +0100)
qcsrc/server/scores.qc
qcsrc/server/scores.qh

index 782c567ceb09ab92b9c94cf5a00522a0aec71ed0..d8e095db00be22114aa9592b51550e35ec41d27d 100644 (file)
@@ -337,8 +337,8 @@ float PlayerScore_Add(entity player, float scorefield, float score)
        if(score)
                if(scores_label[scorefield] != "")
                        s.SendFlags |= pow(2, scorefield);
-       PlayerStats_Event(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label[scorefield]), score);
-       s.(scores_accumulated[scorefield]) += score;
+       if(!inWarmupStage)
+               PlayerStats_Event(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label[scorefield]), score);
        return (s.(scores[scorefield]) += score);
 }
 
index f94b683323dfb8b57d974c7d2b2dd683ace5d90b..3ac0b03b5577dd49cf5dbb5eea7e1ad7e2fd02e6 100644 (file)
@@ -2,8 +2,6 @@ entity scores_initialized; // non-world when scores labels/rules have been set
 .float scores[MAX_SCORE];
 .float teamscores[MAX_TEAMSCORE];
 
-.float scores_accumulated[MAX_SCORE]; // for player stats only
-
 /**
  * Attaches a PlayerScore entity to a player. Use that in ClientConnect.
  * Remember to detach it in ClientDisconnect!