#pragma once
-#include <common/constants.qh>
+#include <common/scores.qh>
entity scores_initialized; // non-NULL when scores labels/rules have been set
.float scoreboard_pos;
*/
float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score);
+/**
+ * Sets the player's score to the score parameter.
+ * NEVER call this if PlayerScore_Attach has not been called yet!
+ * Means: FIXME make players unable to join the game when not called ClientConnect yet.
+ * Returns the new (or old if unchanged) score.
+ */
+float PlayerScore_Set(entity player, PlayerScoreField scorefield, float score);
+
/**
* \brief Returns the player's score.
* \param[in] player Player to inspect.
* NEVER call this if team has not been set yet!
* Returns the new score.
*/
-float TeamScore_AddToTeam(float t, float scorefield, float score);
+float TeamScore_AddToTeam(int t, float scorefield, float score);
/**
* Returns a value indicating the team score (and higher is better).
*/
float PlayerTeamScore_Add(entity player, PlayerScoreField pscorefield, float tscorefield, float score);
-/**
- * Adds to the generic score fields for both the player and the team.
- */
-#define PlayerTeamScore_AddScore(p, s) PlayerTeamScore_Add(p, SP_SCORE, ST_SCORE, s)
-
/**
* Set the label of a team score item, as well as the scoring flags.
*/