]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 23cdae9fbb61d034c575ae4de3dbae29cb5bf19d..fecfea0a7b14219284fe931f0db46c4cef6e8971 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 c9a7e61c432ef3cae0b9ea29f9d5eb5f8616b1d1..192cfdab610bec8c9bcd2a63dd324f37c4aff854 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 a4c993d83f1cd1fc4117f2517aa29b388205fa88..bf743fc08b9fa17d9cd106351b10663e85e8fe50 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 fffae0b85eae5c4d8500dc830c81c191ebe089d5..d0751f3b5879d5f8296aff0ed753e6b61513a2b0 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;