eliminate the g_ctf_win_mode global; campaign uses default win mode now
authorRudolf Polzer <divverent@alientrap.org>
Sun, 5 Dec 2010 20:44:02 +0000 (21:44 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 5 Dec 2010 20:44:02 +0000 (21:44 +0100)
qcsrc/server/ctf.qc
qcsrc/server/defs.qh
qcsrc/server/scores_rules.qc
qcsrc/server/teamplay.qc

index 23cdae9..fecfea0 100644 (file)
@@ -138,7 +138,7 @@ void ctf_flag_spawnstuff()
 
 float ctf_score_value(string parameter)
 {
-       if(g_ctf_win_mode != 2)
+       if(autocvar_g_ctf_win_mode != 2)
                return cvar(strcat("g_ctf_personal", parameter));
        else
                return cvar(strcat("g_ctf_flag", parameter));
index c9a7e61..192cfda 100644 (file)
@@ -22,7 +22,6 @@ float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_midair, g_minsta
 float g_warmup_limit;
 float g_warmup_allguns;
 float g_warmup_allow_timeout;
-float g_ctf_win_mode;
 float g_ctf_ignore_frags;
 float g_ctf_reverse;
 float g_race_qualifying;
index a4c993d..bf743fc 100644 (file)
@@ -56,7 +56,7 @@ void ScoreRules_ctf()
 {
        float sp_score, sp_caps;
        sp_score = sp_caps = 0;
-       switch(g_ctf_win_mode)
+       switch(autocvar_g_ctf_win_mode)
        {
                case 0: // caps only
                        sp_caps = SFL_SORT_PRIO_PRIMARY;
index fffae0b..d0751f3 100644 (file)
@@ -239,12 +239,8 @@ void InitGameplayMode()
                game = GAME_CTF;
                gamemode_name = "Capture the Flag";
                ActivateTeamplay();
-               if(autocvar_g_campaign)
-                       g_ctf_win_mode = 2;
-               else
-                       g_ctf_win_mode = autocvar_g_ctf_win_mode;
                g_ctf_ignore_frags = autocvar_g_ctf_ignore_frags;
-               if(g_ctf_win_mode == 2)
+               if(autocvar_g_ctf_win_mode == 2)
                {
                        fraglimit_override = autocvar_g_ctf_capture_limit;
                        leadlimit_override = autocvar_g_ctf_capture_leadlimit;