From: Lyberta Date: Sat, 3 Jun 2017 16:17:38 +0000 (+0300) Subject: Make PlayerScore_Get a macro. X-Git-Tag: xonotic-v0.8.5~2739^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e2751dedf7bf99788109efb555877fbf1f03ce56;p=xonotic%2Fxonotic-data.pk3dir.git Make PlayerScore_Get a macro. --- 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.