set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent"
set leadlimit 0
+set leadlimit_and_fraglimit 0 "if set, leadlimit is ANDed with fraglimit (otherwise ORed)"
// this means that timelimit can be overidden globally and fraglimit can be overidden for each game mode: DM/TDM, Domination, CTF, and Runematch.
seta timelimit_override -1 "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
float leaderfrags;
float WinningCondition_Scores(float limit, float leadlimit)
{
+ float limitreached;
+
// TODO make everything use THIS winning condition (except LMS)
WinningConditionHelper();
}
}
+ limitreached = FALSE;
+ if(limit)
+ if(WinningConditionHelper_topscore >= limit)
+ limitreached = TRUE;
+ if(leadlimit)
+ {
+ float leadlimitreached;
+ leadlimitreached = (WinningConditionHelper_topscore - WinningConditionHelper_secondscore >= leadlimit);
+ if(cvar("leadlimit_and_fraglimit"))
+ limitreached = (limitreached && leadlimitreached);
+ else
+ limitreached = (limitreached || leadlimitreached);
+ }
+
return GetWinningCode(
- WinningConditionHelper_topscore &&
- (
- (limit && (WinningConditionHelper_topscore >= limit))
- ||
- (leadlimit && (WinningConditionHelper_topscore - WinningConditionHelper_secondscore >= leadlimit))
- ),
+ WinningConditionHelper_topscore && limitreached,
WinningConditionHelper_equality
);
}