From e2751dedf7bf99788109efb555877fbf1f03ce56 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Sat, 3 Jun 2017 19:17:38 +0300 Subject: [PATCH] Make PlayerScore_Get a macro. --- qcsrc/server/scores.qc | 5 ----- qcsrc/server/scores.qh | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 0842997ba..09f230dd6 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -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; diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index 60de66904..2f9c07872 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -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. -- 2.39.2