remove g_ctf_win_mode
authorRudolf Polzer <divverent@xonotic.org>
Thu, 29 Dec 2011 11:25:54 +0000 (12:25 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 29 Dec 2011 11:25:54 +0000 (12:25 +0100)
16 files changed:
ctfscoring-ai.cfg
ctfscoring-alien.cfg
ctfscoring-alpha.cfg
ctfscoring-div0.cfg
ctfscoring-nex242.cfg
ctfscoring-z-lowdeposit.cfg
ctfscoring-z.cfg
defaultXonotic.cfg
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/server/autocvars.qh
qcsrc/server/ctf.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/scores_rules.qc
qcsrc/server/teamplay.qc

index 28ed89d..7113736 100644 (file)
@@ -1,22 +1,3 @@
-set g_ctf_flagscore_pickup_base                   1
-set g_ctf_flagscore_pickup_dropped_early          0
-set g_ctf_flagscore_pickup_dropped_late           1
-set g_ctf_flagscore_capture                      20
-set g_ctf_flagscore_kill                          2
-set g_ctf_flagpenalty_drop                        0
-set g_ctf_flagpenalty_suicidedrop                 1
-set g_ctf_flagpenalty_returned                    0
-set g_ctf_flagscore_return                        3
-set g_ctf_flagscore_return_rogue                  3
-set g_ctf_flagscore_return_by_killer              5
-set g_ctf_flagscore_return_rogue_by_killer        5
-
-// succeeded capture (pickup capture)            21 (0 for enemy)
-// failed capture (pickup kill drop return)       1 (8 for enemy)
-// failed (shot into void) (pickup kill drop)     1 (2 for enemy)
-// capture retry (kill drop pickup)               0..1 (2 for enemy)
-// suicide, then retake (suicidedrop pickup)     -1 (0 for enemy)
-
 set g_ctf_personalscore_pickup_base                   1
 set g_ctf_personalscore_pickup_dropped_early          0
 set g_ctf_personalscore_pickup_dropped_late           1
index a32ffda..dd5758d 100644 (file)
@@ -1,21 +1,3 @@
-set g_ctf_flagscore_pickup_base                   1
-set g_ctf_flagscore_pickup_dropped_early          1
-set g_ctf_flagscore_pickup_dropped_late           1
-set g_ctf_flagscore_capture                      30
-set g_ctf_flagscore_kill                          1
-set g_ctf_flagpenalty_drop                        2
-set g_ctf_flagpenalty_suicidedrop                 2
-set g_ctf_flagpenalty_returned                    0
-set g_ctf_flagscore_return                        5
-set g_ctf_flagscore_return_rogue                 10
-set g_ctf_flagscore_return_by_killer              6
-set g_ctf_flagscore_return_rogue_by_killer       11
-// succeeded capture (pickup capture)            31 (0 for enemy)
-// failed capture (pickup kill drop return)      -1 (6 or 7 for enemy)
-// failed (shot into void) (pickup kill drop)     1 (1 for enemy)
-// capture retry (kill drop pickup)              -1 (1 for enemy)
-// suicide, then retake (suicidedrop pickup)     -1 (0 for enemy)
-
 set g_ctf_personalscore_pickup_base                   1
 set g_ctf_personalscore_pickup_dropped_early          1
 set g_ctf_personalscore_pickup_dropped_late           1
index a97bd6e..c15cee8 100644 (file)
@@ -1,21 +1,3 @@
-set g_ctf_flagscore_pickup_base                   0
-set g_ctf_flagscore_pickup_dropped_early          0
-set g_ctf_flagscore_pickup_dropped_late           0
-set g_ctf_flagscore_capture                      20
-set g_ctf_flagscore_kill                          0
-set g_ctf_flagpenalty_drop                        0
-set g_ctf_flagpenalty_suicidedrop                 0
-set g_ctf_flagpenalty_returned                    0
-set g_ctf_flagscore_return                        5
-set g_ctf_flagscore_return_rogue                 10
-set g_ctf_flagscore_return_by_killer              5
-set g_ctf_flagscore_return_rogue_by_killer       10
-// succeeded capture (pickup capture)            20 (0 for enemy)
-// failed capture (pickup kill drop return)       0 (5 for enemy)
-// failed (shot into void) (pickup kill drop)     0 (0 for enemy)
-// capture retry (kill drop pickup)               0 (0 for enemy)
-// suicide, then retake (suicidedrop pickup)      0 (0 for enemy)
-
 set g_ctf_personalscore_pickup_base                   0
 set g_ctf_personalscore_pickup_dropped_early          0
 set g_ctf_personalscore_pickup_dropped_late           0
index d36d0ad..33c8ab1 100644 (file)
@@ -1,22 +1,3 @@
-set g_ctf_flagscore_pickup_base                   0
-set g_ctf_flagscore_pickup_dropped_early          1
-set g_ctf_flagscore_pickup_dropped_late           1
-set g_ctf_flagscore_capture                      25
-set g_ctf_flagscore_kill                          3
-set g_ctf_flagpenalty_drop                        2
-set g_ctf_flagpenalty_suicidedrop                 2
-set g_ctf_flagpenalty_returned                    1
-set g_ctf_flagscore_return                        5 // not adjusted as this would suck for team game
-set g_ctf_flagscore_return_rogue                 10
-set g_ctf_flagscore_return_by_killer              5
-set g_ctf_flagscore_return_rogue_by_killer       10
-
-// succeeded capture (pickup capture)            25 (0 for enemy)
-// failed capture (pickup kill drop return)      -3 (8 for enemy)
-// failed (shot into void) (pickup kill drop)    -2 (3 for enemy)
-// capture retry (kill drop pickup)              -1 (3 for enemy)
-// suicide, then retake (suicidedrop pickup)     -1 (0 for enemy)
-
 set g_ctf_personalscore_pickup_base                   0
 set g_ctf_personalscore_pickup_dropped_early          1
 set g_ctf_personalscore_pickup_dropped_late           1
index 193cc18..861ead4 100644 (file)
@@ -1,21 +1,3 @@
-set g_ctf_flagscore_pickup_base                   1
-set g_ctf_flagscore_pickup_dropped_early          1
-set g_ctf_flagscore_pickup_dropped_late           1
-set g_ctf_flagscore_capture                      20
-set g_ctf_flagscore_kill                          1
-set g_ctf_flagpenalty_drop                        0
-set g_ctf_flagpenalty_suicidedrop                 1
-set g_ctf_flagpenalty_returned                    0
-set g_ctf_flagscore_return                        5
-set g_ctf_flagscore_return_rogue                 10
-set g_ctf_flagscore_return_by_killer              5
-set g_ctf_flagscore_return_rogue_by_killer       10
-// succeeded capture (pickup capture)            21 (0 for enemy)
-// failed capture (pickup kill drop return)       1 (6 for enemy)
-// failed (shot into void) (pickup kill drop)     1 (1 for enemy)
-// capture retry (kill drop pickup)               1 (1 for enemy)
-// suicide, then retake (suicidedrop pickup)      0 (0 for enemy)
-
 set g_ctf_personalscore_pickup_base                   1
 set g_ctf_personalscore_pickup_dropped_early          1
 set g_ctf_personalscore_pickup_dropped_late           1
index 52acece..c75b306 100644 (file)
@@ -1,5 +1,3 @@
-exec ctfscoring-ai.cfg // fall back to ai's scoring for flag scores, if g_ctf_win_mode is 2, as this system is highly broken in that mode
-
 set g_ctf_personalscore_pickup_base                  -1
 set g_ctf_personalscore_pickup_dropped_early          5
 set g_ctf_personalscore_pickup_dropped_late           9
index bffe0d0..e45bdd9 100644 (file)
@@ -1,5 +1,3 @@
-exec ctfscoring-ai.cfg // fall back to ai's scoring for flag scores, if g_ctf_win_mode is 2, as this system is highly broken in that mode
-
 set g_ctf_personalscore_pickup_base                  -5
 set g_ctf_personalscore_pickup_dropped_early          1
 set g_ctf_personalscore_pickup_dropped_late           5
index a43f289..813163c 100644 (file)
@@ -616,8 +616,6 @@ seta fraglimit_override -1  "Frag limit overriding the mapinfo specified one (use
 seta leadlimit_override -1     "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta capturelimit_override -1  "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta captureleadlimit_override -1      "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_ctf_capture_limit -1    "CTF capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_ctf_capture_leadlimit -1        "CTF capture lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_arena_point_limit -1    "Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_arena_point_leadlimit -1        "Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_domination_point_limit -1       "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
@@ -630,7 +628,6 @@ seta g_race_laps_limit -1   "Race laps limit overriding the mapinfo specified one
 seta g_nexball_goallimit -1 "Nexball goal limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_nexball_goalleadlimit -1 "Nexball goal lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 
-seta g_ctf_win_mode 0  "0: captures only, 1: captures, then points, 2: points only"
 seta g_ctf_ignore_frags 0      "1: regular frags give no points"
 
 set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze teammates by standing next to them"
index 9233166..1b32c9d 100644 (file)
@@ -472,8 +472,7 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
        {
                sa = car(s);
                if(sa != "")
-                       if(cvar("g_ctf_win_mode") < 2)
-                               cvar_set("fraglimit", sa);
+                       cvar_set("fraglimit", sa);
                s = cdr(s);
        }
 
@@ -547,7 +546,6 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
        string sa, k, v;
        float p;
        string fraglimit_normal;
-       string fraglimit_caps;
        string fraglimit_teams;
 
        MapInfo_Map_supportedGametypes |= pThisType;
@@ -565,7 +563,6 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
        cvar_set("g_race_qualifying_timelimit", cvar_defstring("g_race_qualifying_timelimit"));
 
        fraglimit_normal = string_null;
-       fraglimit_caps = string_null;
        fraglimit_teams = string_null;
 
        s = strcat(_MapInfo_GetDefaultEx(pWantedType), " ", s);
@@ -597,14 +594,10 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
                {
                        cvar_set("leadlimit", v);
                }
-               else if(k == "pointlimit" || k == "fraglimit" || k == "lives" || k == "laplimit")
+               else if(k == "pointlimit" || k == "fraglimit" || k == "lives" || k == "laplimit" || k == "caplimit")
                {
                        fraglimit_normal = v;
                }
-               else if(k == "caplimit")
-               {
-                       fraglimit_caps = v;
-               }
                else if(k == "teampointlimit" || k == "teamlaplimit")
                {
                        fraglimit_teams = v;
@@ -629,12 +622,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
                }
        }
 
-       if(pWantedType == MAPINFO_TYPE_CTF && cvar("g_ctf_win_mode") < 2)
-       {
-               if(fraglimit_caps)
-                       cvar_set("fraglimit", fraglimit_caps);
-       }
-       else if(pWantedType == MAPINFO_TYPE_RACE && cvar("g_race_teams") >= 2)
+       if(pWantedType == MAPINFO_TYPE_RACE && cvar("g_race_teams") >= 2)
        {
                if(fraglimit_teams)
                        cvar_set("fraglimit", fraglimit_teams);
index 1fc8bb5..e47a283 100644 (file)
@@ -54,7 +54,7 @@ REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,"timelimit=20 skill=-1")
 REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,"timelimit=20 pointlimit=50 teams=2 leadlimit=0")
 #define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH)
 
-REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 pointlimit=300 caplimit=10 leadlimit=0")
+REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 caplimit=10 leadlimit=0")
 #define g_ctf IS_GAMETYPE(CTF)
 
 REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,"timelimit=20 pointlimit=10 leadlimit=0")
index 9cd1fa9..d418402 100644 (file)
@@ -757,8 +757,6 @@ float autocvar_g_chat_flood_spl_tell;
 float autocvar_g_chat_nospectators;
 float autocvar_g_chat_teamcolors;
 float autocvar_g_ctf_captimerecord_always;
-float autocvar_g_ctf_capture_leadlimit;
-float autocvar_g_ctf_capture_limit;
 float autocvar_g_ctf_dynamiclights;
 string autocvar_g_ctf_flag_blue_model;
 float autocvar_g_ctf_flag_blue_skin;
index 6f7198c..f583537 100644 (file)
@@ -135,10 +135,7 @@ void ctf_flag_spawnstuff()
 
 float ctf_score_value(string parameter)
 {
-       if(g_ctf_win_mode != 2)
-               return cvar(strcat("g_ctf_personal", parameter));
-       else
-               return cvar(strcat("g_ctf_flag", parameter));
+       return cvar(strcat("g_ctf_personal", parameter));
 }
 
 void FakeTimeLimit(entity e, float t)
@@ -1012,11 +1009,6 @@ void ctf_init()
        captureshield_min_negscore = autocvar_g_ctf_shield_min_negscore;
        captureshield_max_ratio = autocvar_g_ctf_shield_max_ratio;
        captureshield_force = autocvar_g_ctf_shield_force;
-
-
-//#NO AUTOCVARS START
-       g_ctf_win_mode = cvar("g_ctf_win_mode");
-//#NO AUTOCVARS END
 }
 
 void ctf_setstatus2(entity flag, float shift)
index bea9fdd..4b2684c 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 f115434..e4ed89a 100644 (file)
@@ -372,7 +372,6 @@ void cvar_changes_init()
                BADCVAR("g_balance_kill_delay");
                BADCVAR("g_ca_point_leadlimit");
                BADCVAR("g_ctf_captimerecord_always");
-               BADCVAR("g_ctf_capture_leadlimit");
                BADCVAR("g_ctf_flag_capture_effects");
                BADCVAR("g_ctf_flag_glowtrails");
                BADCVAR("g_ctf_flag_pickup_effects");
@@ -427,9 +426,7 @@ void cvar_changes_init()
                BADCVAR("g_balance_teams_force");
                BADCVAR("g_ban_sync_trusted_servers");
                BADCVAR("g_ban_sync_uri");
-               BADCVAR("g_ctf_capture_limit");
                BADCVAR("g_ctf_ignore_frags");
-               BADCVAR("g_ctf_win_mode");
                BADCVAR("g_domination_point_limit");
                BADCVAR("g_friendlyfire");
                BADCVAR("g_fullbrightitems");
index eb7205e..806e245 100644 (file)
@@ -53,27 +53,9 @@ void ScoreRules_generic()
 #define SP_CTF_RETURNS 8
 void ScoreRules_ctf()
 {
-       float sp_score, sp_caps;
-       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
-               default:
-                       sp_caps = SFL_SORT_PRIO_SECONDARY; // looks better ;)
-                       sp_score = SFL_SORT_PRIO_PRIMARY;
-                       break;
-       }
-
        CheckAllowedTeams(world);
-       ScoreRules_basics(2 + (c3>=0), SFL_SORT_PRIO_PRIMARY, sp_score, TRUE); // NOTE this assumes that the rogue team is team 3
-       ScoreInfo_SetLabel_TeamScore  (ST_CTF_CAPS,     "caps",      sp_caps);
+       ScoreRules_basics(2 + (c3>=0), SFL_SORT_PRIO_PRIMARY, 0, TRUE); // NOTE this assumes that the rogue team is team 3
+       ScoreInfo_SetLabel_TeamScore  (ST_CTF_CAPS,     "caps",      SFL_SORT_PRIO_PRIMARY);
        ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPS,     "caps",      SFL_SORT_PRIO_SECONDARY);
        ScoreInfo_SetLabel_PlayerScore(SP_CTF_PICKUPS,  "pickups",   0);
        ScoreInfo_SetLabel_PlayerScore(SP_CTF_FCKILLS,  "fckills",   0);
index 52bab5d..f0ce8fd 100644 (file)
@@ -159,16 +159,8 @@ void InitGameplayMode()
        {
                ActivateTeamplay();
                g_ctf_ignore_frags = autocvar_g_ctf_ignore_frags;
-               if(g_ctf_win_mode == 2)
-               {
-                       fraglimit_override = autocvar_g_ctf_capture_limit;
-                       leadlimit_override = autocvar_g_ctf_capture_leadlimit;
-               }
-               else
-               {
-                       fraglimit_override = autocvar_capturelimit_override;
-                       leadlimit_override = autocvar_captureleadlimit_override;
-               }
+               fraglimit_override = autocvar_capturelimit_override;
+               leadlimit_override = autocvar_captureleadlimit_override;
                ctf_init();
                have_team_spawns = -1; // request team spawns
        }