From: terencehill Date: Mon, 4 Apr 2016 01:41:54 +0000 (+0200) Subject: Fix timelimit_override and similar cvars not being properly read in many game modes... X-Git-Tag: xonotic-v0.8.2~971^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F308%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Fix timelimit_override and similar cvars not being properly read in many game modes. Fixes #1723 --- diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 1d500c1a6..390212d06 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -1095,7 +1095,7 @@ REGISTER_MUTATOR(nb, g_nexball) WEP_NEXBALL.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED; ActivateTeamplay(); - SetLimits(autocvar_g_nexball_goallimit, autocvar_g_nexball_goalleadlimit, -1, -1); + SetLimits(autocvar_g_nexball_goallimit, autocvar_g_nexball_goalleadlimit, autocvar_timelimit_override, -1); have_team_spawns = -1; // request team spawns } diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index 5271beba1..95c789841 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -13,7 +13,7 @@ REGISTER_MUTATOR(ons, false) ons_Initialize(); ActivateTeamplay(); - SetLimits(autocvar_g_onslaught_point_limit, -1, -1, -1); + SetLimits(autocvar_g_onslaught_point_limit, autocvar_leadlimit_override, autocvar_timelimit_override, -1); have_team_spawns = -1; // request team spawns } diff --git a/qcsrc/server/mutators/mutator/gamemode_ca.qc b/qcsrc/server/mutators/mutator/gamemode_ca.qc index 9a9d22880..072fe90dd 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ca.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qc @@ -47,7 +47,7 @@ REGISTER_MUTATOR(ca, false) EliminatedPlayers_Init(ca_isEliminated); ActivateTeamplay(); - SetLimits(autocvar_g_ca_point_limit, autocvar_g_ca_point_leadlimit, -1, -1); + SetLimits(autocvar_g_ca_point_limit, autocvar_g_ca_point_leadlimit, autocvar_timelimit_override, -1); if (autocvar_g_ca_team_spawns) have_team_spawns = -1; // request team spawns diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index a7d6fb2a1..83618a2f8 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -13,7 +13,7 @@ REGISTER_MUTATOR(ctf, false) ctf_Initialize(); ActivateTeamplay(); - SetLimits(autocvar_capturelimit_override, autocvar_captureleadlimit_override, -1, -1); + SetLimits(autocvar_capturelimit_override, autocvar_captureleadlimit_override, autocvar_timelimit_override, -1); have_team_spawns = -1; // request team spawns } diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index 1f99c938d..f05b53ce8 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -15,7 +15,7 @@ REGISTER_MUTATOR(cts, false) g_race_qualifying = true; independent_players = 1; - SetLimits(0, 0, -1, -1); + SetLimits(0, 0, autocvar_timelimit_override, -1); cts_Initialize(); } diff --git a/qcsrc/server/mutators/mutator/gamemode_domination.qc b/qcsrc/server/mutators/mutator/gamemode_domination.qc index 01f17ec9f..3a32c2031 100644 --- a/qcsrc/server/mutators/mutator/gamemode_domination.qc +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qc @@ -22,7 +22,7 @@ REGISTER_MUTATOR(dom, false) fraglimit_override = autocvar_g_domination_roundbased_point_limit; ActivateTeamplay(); - SetLimits(fraglimit_override, autocvar_g_domination_point_leadlimit, -1, -1); + SetLimits(fraglimit_override, autocvar_g_domination_point_leadlimit, autocvar_timelimit_override, -1); have_team_spawns = -1; // request team spawns } diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 8482e258e..f57661fba 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -16,7 +16,7 @@ REGISTER_MUTATOR(ft, false) freezetag_Initialize(); ActivateTeamplay(); - SetLimits(autocvar_g_freezetag_point_limit, autocvar_g_freezetag_point_leadlimit, -1, -1); + SetLimits(autocvar_g_freezetag_point_limit, autocvar_g_freezetag_point_leadlimit, autocvar_timelimit_override, -1); if (autocvar_g_freezetag_team_spawns) have_team_spawns = -1; // request team spawns diff --git a/qcsrc/server/mutators/mutator/gamemode_invasion.qc b/qcsrc/server/mutators/mutator/gamemode_invasion.qc index efb6842e5..e49bf3d54 100644 --- a/qcsrc/server/mutators/mutator/gamemode_invasion.qc +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qc @@ -19,7 +19,7 @@ REGISTER_MUTATOR(inv, false) cvar_settemp("g_monsters", "1"); - SetLimits(autocvar_g_invasion_point_limit, -1, -1, -1); + SetLimits(autocvar_g_invasion_point_limit, autocvar_leadlimit_override, autocvar_timelimit_override, -1); if (autocvar_g_invasion_teams >= 2) { ActivateTeamplay(); diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index dbcaa5f89..e311f72c1 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -16,7 +16,7 @@ REGISTER_MUTATOR(kh, false) kh_Initialize(); ActivateTeamplay(); - SetLimits(autocvar_g_keyhunt_point_limit, autocvar_g_keyhunt_point_leadlimit, -1, -1); + SetLimits(autocvar_g_keyhunt_point_limit, autocvar_g_keyhunt_point_leadlimit, autocvar_timelimit_override, -1); if (autocvar_g_keyhunt_team_spawns) have_team_spawns = -1; // request team spawns } diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index a2f1f2507..22850d8b8 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -13,7 +13,7 @@ REGISTER_MUTATOR(lms, false) error("This is a game type and it cannot be added at runtime."); lms_Initialize(); - SetLimits(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override), 0, -1, -1); + SetLimits(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override), 0, autocvar_timelimit_override, -1); } MUTATOR_ONROLLBACK_OR_REMOVE diff --git a/qcsrc/server/mutators/mutator/gamemode_tdm.qc b/qcsrc/server/mutators/mutator/gamemode_tdm.qc index 078e3517d..6c22a8e19 100644 --- a/qcsrc/server/mutators/mutator/gamemode_tdm.qc +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qc @@ -16,7 +16,7 @@ REGISTER_MUTATOR(tdm, false) InitializeEntity(world, tdm_DelayedInit, INITPRIO_GAMETYPE); ActivateTeamplay(); - SetLimits(autocvar_g_tdm_point_limit, autocvar_g_tdm_point_leadlimit, -1, -1); + SetLimits(autocvar_g_tdm_point_limit, autocvar_g_tdm_point_leadlimit, autocvar_timelimit_override, -1); if (autocvar_g_tdm_team_spawns) have_team_spawns = -1; // request team spawns }