r4468 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Sep 19 03:36:14 EDT 2008
Author: div0
Date: 2008-09-19 03:36:10 -0400 (Fri, 19 Sep 2008)
New Revision: 4468
Modified:
trunk/data/qcsrc/server/scores_rules.qc
Log:
allow the "score" column even if disabled by CTF win mode
Modified: trunk/data/qcsrc/server/scores_rules.qc
===================================================================
--- trunk/data/qcsrc/server/scores_rules.qc 2008-09-19 06:39:27 UTC (rev 4467)
+++ trunk/data/qcsrc/server/scores_rules.qc 2008-09-19 07:36:10 UTC (rev 4468)
@@ -4,7 +4,7 @@
// NOTE: SP_ constants may not be >= MAX_SCORE; ST_constants may not be >= MAX_TEAMSCORE
// scores that should be in all modes:
float ScoreRules_teams;
-void ScoreRules_basics(float teams, float sprio)
+void ScoreRules_basics(float teams, float sprio, float score_enabled)
{
float i;
for(i = 0; i < MAX_SCORE; ++i)
@@ -14,7 +14,7 @@
ScoreRules_teams = teams;
- if(sprio)
+ if(score_enabled)
ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", sprio);
if not(independent_players)
@@ -25,7 +25,7 @@
if not(independent_players)
ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER);
- if(sprio)
+ if(score_enabled)
ScoreInfo_SetLabel_PlayerScore(SP_SCORE, "score", sprio);
}
void ScoreRules_basics_end()
@@ -38,10 +38,10 @@
if(teamplay)
{
CheckAllowedTeams(world);
- ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY);
+ ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, TRUE);
}
else
- ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY);
+ ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, TRUE);
ScoreRules_basics_end();
}
@@ -72,7 +72,7 @@
}
CheckAllowedTeams(world);
- ScoreRules_basics(2 + (c3>=0), sp_score); // NOTE this assumes that the rogue team is team 3
+ ScoreRules_basics(2 + (c3>=0), sp_score, TRUE); // NOTE this assumes that the rogue team is team 3
ScoreInfo_SetLabel_TeamScore (ST_CTF_CAPS, "caps", sp_caps);
ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPS, "caps", sp_caps);
ScoreInfo_SetLabel_PlayerScore(SP_CTF_PICKUPS, "pickups", 0);
@@ -94,7 +94,7 @@
else
sp_score = SFL_SORT_PRIO_PRIMARY;
CheckAllowedTeams(world);
- ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), sp_score);
+ ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), sp_score, TRUE);
ScoreInfo_SetLabel_TeamScore (ST_DOM_TICKS, "ticks", sp_domticks);
ScoreInfo_SetLabel_PlayerScore(SP_DOM_TICKS, "ticks", sp_domticks);
ScoreInfo_SetLabel_PlayerScore(SP_DOM_TAKES, "takes", 0);
@@ -106,7 +106,7 @@
#define SP_LMS_RANK 5
void ScoreRules_lms()
{
- ScoreRules_basics(0, 0);
+ ScoreRules_basics(0, 0, FALSE);
ScoreInfo_SetLabel_PlayerScore(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY);
ScoreInfo_SetLabel_PlayerScore(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_RANK | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE);
ScoreRules_basics_end();
@@ -122,7 +122,7 @@
#define SP_KH_LOSSES 9
void ScoreRules_kh(float teams)
{
- ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY);
+ ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, TRUE);
ScoreInfo_SetLabel_TeamScore (ST_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
ScoreInfo_SetLabel_PlayerScore(SP_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
ScoreInfo_SetLabel_PlayerScore(SP_KH_PUSHES, "pushes", 0);
@@ -140,7 +140,7 @@
#define SP_RACE_TIME 5
void ScoreRules_race()
{
- ScoreRules_basics(race_teams, 0);
+ ScoreRules_basics(race_teams, 0, FALSE);
if(race_teams)
{
ScoreInfo_SetLabel_TeamScore( ST_RACE_LAPS, "laps", SFL_SORT_PRIO_PRIMARY);
More information about the nexuiz-commits
mailing list