From: Mario Date: Wed, 14 Oct 2015 15:14:02 +0000 (+1000) Subject: Destroy another gamemode specific check X-Git-Tag: xonotic-v0.8.2~1801^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c6919fbc0bc1a0b60d49893e38d3c924a6d64b1e;p=xonotic%2Fxonotic-data.pk3dir.git Destroy another gamemode specific check --- diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 043f5b959..1c9dfe689 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -340,8 +340,8 @@ void readlevelcvars(void) g_warmup_allguns = cvar("g_warmup_allguns"); g_warmup_allow_timeout = cvar("g_warmup_allow_timeout"); - if ((g_race && g_race_qualifying == 2) || g_assault || cvar("g_campaign")) - warmup_stage = 0; // these modes cannot work together, sorry + if(cvar("g_campaign")) + warmup_stage = 0; // no warmup during campaign g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon"); g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon"); @@ -409,6 +409,8 @@ void readlevelcvars(void) if(!g_weapon_stay) g_weapon_stay = cvar("g_weapon_stay"); + MUTATOR_CALLHOOK(ReadLevelCvars); + if (!warmup_stage) game_starttime = time + cvar("g_start_delay"); diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index e446816e5..b9727c7e1 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -771,4 +771,6 @@ MUTATOR_HOOKABLE(DropSpecialItems, EV_DropSpecialItems); * return 1 to prevent spawning */ MUTATOR_HOOKABLE(AllowMobButcher, EV_NO_ARGS); + +MUTATOR_HOOKABLE(ReadLevelCvars, EV_NO_ARGS); #endif diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index 8df531915..e3a28e3c4 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -579,6 +579,13 @@ MUTATOR_HOOKFUNCTION(as, CheckRules_World) return true; } +MUTATOR_HOOKFUNCTION(as, ReadLevelCvars) +{ + // no assault warmups + warmup_stage = 0; + return false; +} + // scoreboard setup void assault_ScoreRules() { diff --git a/qcsrc/server/mutators/gamemode_race.qc b/qcsrc/server/mutators/gamemode_race.qc index 735bce7e0..b7c660a46 100644 --- a/qcsrc/server/mutators/gamemode_race.qc +++ b/qcsrc/server/mutators/gamemode_race.qc @@ -322,6 +322,13 @@ MUTATOR_HOOKFUNCTION(rc, CheckRules_World) return false; } +MUTATOR_HOOKFUNCTION(rc, ReadLevelCvars) +{ + if(g_race_qualifying == 2) + warmup_stage = 0; + return false; +} + void race_Initialize() { race_ScoreRules();