X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qh;h=ff0555cad6cf4d24a27dc9089a327d45dc9bed97;hb=253cc10990569fd90917dba809ce03c90fc89336;hp=423fd303cf3a4da0103ae06c18ed1f98113d65ab;hpb=fb68727685088a166e860276f116be6f75cf2d98;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index 423fd303c..ff0555cad 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -1,6 +1,10 @@ +#ifndef SCORES_H +#define SCORES_H + entity scores_initialized; // non-world when scores labels/rules have been set .float scores[MAX_SCORE]; .float teamscores[MAX_TEAMSCORE]; +.float scoreboard_pos; /** * Attaches a PlayerScore entity to a player. Use that in ClientConnect. @@ -25,8 +29,9 @@ float PlayerScore_Add(entity player, float scorefield, float score); * Initialize the score of this player if needed. * Does nothing in teamplay. * Use that when a spectator becomes a player. + * Returns whether clearing has been performed */ -void PlayerScore_Clear(entity player); +float PlayerScore_Clear(entity player); /** * Adds a score to the player's team's scores. @@ -119,5 +124,7 @@ string GetTeamScoreString(float tm, float shortString); * Returns the beginning of a sorted chain of the non-spectators. * teams: >0: sort by teams first (always strict ordering); <0: sort by teams only (respects strict flag) * strict: return a strict ordering + * nospectators: exclude spectators */ -entity PlayerScore_Sort(.float field, float teams, float strict); +entity PlayerScore_Sort(.float field, float teams, float strict, float nospectators); +#endif