X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qh;h=c26a4d295ea78cc9ab977d447f336ce7dbcd424f;hb=5310c50bac3297a0f8f21db55e8095921f61c656;hp=96f15bc804266766b2180ab56f22e99a1d11cf61;hpb=373da6f709e05d4e1bf696da0b03ef2a880a2583;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index 96f15bc80..c26a4d295 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -1,6 +1,7 @@ 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 +26,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. @@ -117,5 +119,8 @@ string GetTeamScoreString(float tm, float shortString); * Sorts the players and stores their place in the given field, starting with * 1. Non-players get 0 written into that field. * 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 strict); +entity PlayerScore_Sort(.float field, float teams, float strict, float nospectators);