]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Destroy another gamemode specific check
authorMario <mario@smbclan.net>
Wed, 14 Oct 2015 15:14:02 +0000 (01:14 +1000)
committerMario <mario@smbclan.net>
Wed, 14 Oct 2015 15:14:02 +0000 (01:14 +1000)
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/mutators/gamemode_race.qc

index 043f5b9593f1f13e2aaeb2e9c17221cd02ee3f4f..1c9dfe689757308570a3b27bbcb347a89d78e200 100644 (file)
@@ -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");
 
index e446816e50e4fc01e9fd6c74dfdb85a5b26e83b1..b9727c7e1f08ceebc17ec69446deab82da9c791b 100644 (file)
@@ -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
index 8df531915640651c45ca02798d0409f92f37565a..e3a28e3c4d9986027b8ce7517f3991f248db268e 100644 (file)
@@ -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()
 {
index 735bce7e059f1164c9c782b4f642bdf412dc20d6..b7c660a4622cde53a8aa42446d69b4f5d6561d03 100644 (file)
@@ -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();