r3927 - in trunk/data: . qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Jul 26 13:26:02 EDT 2008
Author: div0
Date: 2008-07-26 13:26:02 -0400 (Sat, 26 Jul 2008)
New Revision: 3927
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/server/ctf.qc
trunk/data/qcsrc/server/g_world.qc
trunk/data/qcsrc/server/teamplay.qc
Log:
fix the CTF win modes; get rid of capturelimit cvar
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2008-07-26 16:48:40 UTC (rev 3926)
+++ trunk/data/defaultNexuiz.cfg 2008-07-26 17:26:02 UTC (rev 3927)
@@ -319,13 +319,13 @@
// 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
seta fraglimit_override -1
-seta capturelimit_override -1 // actual captures, if g_ctf_win_mode 0
-seta g_ctf_capture_limit -1 // points, if g_ctf_win_mode 1
+seta capturelimit_override -1 // actual captures, if g_ctf_win_mode 0 or 1
+seta g_ctf_capture_limit -1 // points, if g_ctf_win_mode 2
seta g_domination_point_limit -1
seta g_runematch_point_limit -1
seta g_keyhunt_point_limit -1
-seta g_ctf_win_mode 1 // 0: captures only, 1: points
+seta g_ctf_win_mode 2 // 0: captures only, 1: captures, then points, 2: points only
// 50% of the spawns shall be far away from any players
set g_spawn_furthest 0.5
Modified: trunk/data/qcsrc/server/ctf.qc
===================================================================
--- trunk/data/qcsrc/server/ctf.qc 2008-07-26 16:48:40 UTC (rev 3926)
+++ trunk/data/qcsrc/server/ctf.qc 2008-07-26 17:26:02 UTC (rev 3927)
@@ -669,11 +669,20 @@
ctf_spawnteams();
float sp_score, sp_caps;
- sp_score = sp_caps = SFL_SORT_PRIO_SECONDARY;
- if(g_ctf_win_mode)
- sp_score = SFL_SORT_PRIO_PRIMARY;
- else
- sp_caps = SFL_SORT_PRIO_PRIMARY;
+ sp_score = sp_caps = 0;
+ switch(g_ctf_win_mode)
+ {
+ case 0: // caps only
+ sp_caps = SFL_SORT_PRIO_PRIMARY;
+ break;
+ case 1: // caps, then score
+ sp_caps = SFL_SORT_PRIO_PRIMARY;
+ sp_score = SFL_SORT_PRIO_SECONDARY;
+ break;
+ case 2: // score only
+ sp_score = SFL_SORT_PRIO_SECONDARY;
+ break;
+ }
CheckAllowedTeams(world);
ScoreInfo_Init(2 + (c3>=0)); // NOTE this assumes that the rogue team is team 3
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2008-07-26 16:48:40 UTC (rev 3926)
+++ trunk/data/qcsrc/server/g_world.qc 2008-07-26 17:26:02 UTC (rev 3927)
@@ -1551,7 +1551,6 @@
local float status;
local float timelimit;
local float fraglimit;
- local float capturelimit;
VoteThink();
MapVote_Think();
@@ -1580,7 +1579,6 @@
timelimit = cvar("timelimit") * 60;
fraglimit = cvar("fraglimit");
- capturelimit = cvar("capturelimit");
if(checkrules_overtimeend)
{
@@ -1626,10 +1624,6 @@
{
status = WinningCondition_Onslaught(); // TODO remove this?
}
- else if(g_ctf && !g_ctf_win_mode)
- {
- status = WinningCondition_Scores(capturelimit);
- }
else
{
status = WinningCondition_Scores(fraglimit);
Modified: trunk/data/qcsrc/server/teamplay.qc
===================================================================
--- trunk/data/qcsrc/server/teamplay.qc 2008-07-26 16:48:40 UTC (rev 3926)
+++ trunk/data/qcsrc/server/teamplay.qc 2008-07-26 17:26:02 UTC (rev 3927)
@@ -324,6 +324,10 @@
cache_lastmutatormsg = strzone("");
cache_lastmotd = strzone("");
+ if(g_ctf)
+ if(g_ctf_win_mode != 2)
+ fraglimit_override = capturelimit_override;
+
// enforce the server's universal frag/time limits
if(!cvar("g_campaign"))
{
@@ -331,8 +335,6 @@
cvar_set("fraglimit", ftos(fraglimit_override));
if(timelimit_override >= 0)
cvar_set("timelimit", ftos(timelimit_override));
- if(capturelimit_override >= 0)
- cvar_set("capturelimit", ftos(capturelimit_override));
}
if (game == GAME_DOMINATION)//cvar("g_domination"))
More information about the nexuiz-commits
mailing list