X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores_rules.qc;h=ac060dab532174d6782108c91857918c64d352a4;hb=fd8f8a153c6b9f55d5077307da69a011a0ca1514;hp=7511162aa57748ab2f3385185c3bd26f541b814f;hpb=d44927502027bfa3ccd6ccc98d9b7d6285c182c3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index 7511162aa..ac060dab5 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -1,12 +1,11 @@ #include "scores_rules.qh" -#include -#include -#include -#include "client.qh" -#include "scores.qh" #include -#include "teamplay.qh" +#include +#include +#include +#include +#include int ScoreRules_teams; @@ -26,28 +25,28 @@ void ScoreRules_basics(int teams, float sprio, float stprio, float score_enabled { FOREACH(Scores, true, { ScoreInfo_SetLabel_PlayerScore(it, "", 0); - }); + }); for(int i = 0; i < MAX_TEAMSCORE; ++i) ScoreInfo_SetLabel_TeamScore(i, "", 0); ScoreRules_teams = teams; if(score_enabled) - ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", stprio); + ScoreInfo_SetLabel_TeamScore(ST_SCORE, "score", stprio); if (!INDEPENDENT_PLAYERS) - ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0); + ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0); - ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER); + ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER); if (!INDEPENDENT_PLAYERS) { - ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER); - ScoreInfo_SetLabel_PlayerScore(SP_TEAMKILLS, "teamkills", SFL_LOWER_IS_BETTER); + ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER); + ScoreInfo_SetLabel_PlayerScore(SP_TEAMKILLS, "teamkills", SFL_LOWER_IS_BETTER); } if(score_enabled) - ScoreInfo_SetLabel_PlayerScore(SP_SCORE, "score", sprio); + ScoreInfo_SetLabel_PlayerScore(SP_SCORE, "score", sprio); ScoreInfo_SetLabel_PlayerScore(SP_DMG, "dmg", 0); ScoreInfo_SetLabel_PlayerScore(SP_DMGTAKEN, "dmgtaken", SFL_LOWER_IS_BETTER); @@ -56,13 +55,15 @@ void ScoreRules_basics(int teams, float sprio, float stprio, float score_enabled if(STAT(SHOWFPS)) ScoreInfo_SetLabel_PlayerScore(SP_FPS, "fps", 0); } + void ScoreRules_basics_end() { ScoreInfo_Init(ScoreRules_teams); } + void ScoreRules_generic() { - int teams = 0; + int teams = 0; if (teamplay) { entity balance = TeamBalance_CheckAllowedTeams(NULL);