From 49a98f7b45d0e915b73184f83cb89d74edfdc922 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 29 Dec 2011 12:25:54 +0100 Subject: [PATCH] remove g_ctf_win_mode --- ctfscoring-ai.cfg | 19 ------------------- ctfscoring-alien.cfg | 18 ------------------ ctfscoring-alpha.cfg | 18 ------------------ ctfscoring-div0.cfg | 19 ------------------- ctfscoring-nex242.cfg | 18 ------------------ ctfscoring-z-lowdeposit.cfg | 2 -- ctfscoring-z.cfg | 2 -- defaultXonotic.cfg | 3 --- qcsrc/common/mapinfo.qc | 18 +++--------------- qcsrc/common/mapinfo.qh | 2 +- qcsrc/server/autocvars.qh | 2 -- qcsrc/server/ctf.qc | 10 +--------- qcsrc/server/defs.qh | 1 - qcsrc/server/g_world.qc | 3 --- qcsrc/server/scores_rules.qc | 22 ++-------------------- qcsrc/server/teamplay.qc | 12 ++---------- 16 files changed, 9 insertions(+), 160 deletions(-) diff --git a/ctfscoring-ai.cfg b/ctfscoring-ai.cfg index 28ed89dd5..711373647 100644 --- a/ctfscoring-ai.cfg +++ b/ctfscoring-ai.cfg @@ -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 diff --git a/ctfscoring-alien.cfg b/ctfscoring-alien.cfg index a32ffda13..dd5758d49 100644 --- a/ctfscoring-alien.cfg +++ b/ctfscoring-alien.cfg @@ -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 diff --git a/ctfscoring-alpha.cfg b/ctfscoring-alpha.cfg index a97bd6e64..c15cee8da 100644 --- a/ctfscoring-alpha.cfg +++ b/ctfscoring-alpha.cfg @@ -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 diff --git a/ctfscoring-div0.cfg b/ctfscoring-div0.cfg index d36d0ad10..33c8ab1b7 100644 --- a/ctfscoring-div0.cfg +++ b/ctfscoring-div0.cfg @@ -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 diff --git a/ctfscoring-nex242.cfg b/ctfscoring-nex242.cfg index 193cc183f..861ead461 100644 --- a/ctfscoring-nex242.cfg +++ b/ctfscoring-nex242.cfg @@ -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 diff --git a/ctfscoring-z-lowdeposit.cfg b/ctfscoring-z-lowdeposit.cfg index 52acece12..c75b30680 100644 --- a/ctfscoring-z-lowdeposit.cfg +++ b/ctfscoring-z-lowdeposit.cfg @@ -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 diff --git a/ctfscoring-z.cfg b/ctfscoring-z.cfg index bffe0d056..e45bdd93a 100644 --- a/ctfscoring-z.cfg +++ b/ctfscoring-z.cfg @@ -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 diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index a43f289cf..813163cc8 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 923316652..1b32c9d1d 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -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); diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 1fc8bb59f..e47a28369 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -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") diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 9cd1fa9e8..d41840250 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/ctf.qc b/qcsrc/server/ctf.qc index 6f7198c2a..f5835377d 100644 --- a/qcsrc/server/ctf.qc +++ b/qcsrc/server/ctf.qc @@ -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) diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index bea9fddb3..4b2684c51 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index f115434a2..e4ed89a85 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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"); diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index eb7205e9c..806e24507 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -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); diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 52bab5d9d..f0ce8fd14 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -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 } -- 2.39.2