]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make PlayerScore_Get a macro.
authorLyberta <lyberta@lyberta.net>
Sat, 3 Jun 2017 16:17:38 +0000 (19:17 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 3 Jun 2017 16:17:38 +0000 (19:17 +0300)
qcsrc/server/scores.qc
qcsrc/server/scores.qh

index 0842997ba423c772cc8c7c8c0f628bc695399ea5..09f230dd6bf4bcfa29a50a44171d0a7688f75e06 100644 (file)
@@ -347,11 +347,6 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score)
        return (s.(scores(scorefield)) += score);
 }
 
-float PlayerScore_Get(entity player, PlayerScoreField scorefield)
-{
-       return player.scorekeeper.scores(scorefield);
-}
-
 float PlayerTeamScore_Add(entity player, PlayerScoreField pscorefield, float tscorefield, float score)
 {
        float r;
index 60de66904bf66f1513b051906279664b43868a3f..2f9c0787239dbff7d6b7452e840b3de17b2e3860 100644 (file)
@@ -30,7 +30,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score);
  * \param[in] scorefield Field of the score.
  * \return Player's score.
  */
-float PlayerScore_Get(entity player, PlayerScoreField scorefield);
+#define PlayerScore_Get(player, scorefield) PlayerScore_Add(player, scorefield, 0)
 
 /**
  * Initialize the score of this player if needed.