]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Moved observe_blocked to CA code
authorz411 <z411@omaera.org>
Wed, 19 Oct 2022 18:36:04 +0000 (15:36 -0300)
committerz411 <z411@omaera.org>
Wed, 19 Oct 2022 18:49:15 +0000 (15:49 -0300)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh
qcsrc/server/client.qc
qcsrc/server/world.qc

index c352d14f9efbe3d6306baa623c75419cb6c38837..d5d5e5ccad23170663d24f8bc3ca79d267038145 100644 (file)
@@ -3,6 +3,7 @@
 #include <common/mutators/base.qh>
 #include <server/elimination.qh>
 #include <server/round_handler.qh>
+#include <server/world.qh>
 #include <server/command/sv_cmd.qh>
 
 int autocvar_g_ca_spectate_enemies;
@@ -38,6 +39,8 @@ REGISTER_MUTATOR(ca, false)
                ca_teams = autocvar_g_ca_teams_override;
                if (ca_teams < 2)
                        ca_teams = cvar("g_ca_teams"); // read the cvar directly as it gets written earlier in the same frame
+               if (autocvar_g_ca_spectate_enemies == -1)
+                       observe_blocked = true;
 
                ca_teams = BITS(bound(2, ca_teams, 4));
         GameRules_scoring(ca_teams, SFL_SORT_PRIO_PRIMARY, 0, {
index ba3428c5c50ddf7842d072b65016fe0ba3b0c80a..c5c79ed02921cb6713de634246cc593b29431f4a 100644 (file)
@@ -7,7 +7,6 @@
 #include <common/ent_cs.qh>
 #include <common/gamemodes/_mod.qh>
 #include <common/gamemodes/gamemode/nexball/sv_nexball.qh>
-#include <common/gamemodes/gamemode/clanarena/sv_clanarena.qh>
 #include <common/items/_mod.qh>
 #include <common/items/inventory.qh>
 #include <common/mapobjects/func/conveyor.qh>
index 04f2de9d229f5a26053c2d0688fa98c7b3862a44..4334cb422e3281c450a08034d14557046a80eac3 100644 (file)
@@ -707,9 +707,6 @@ void InitGameplayMode()
        cache_mutatormsg = strzone("");
        cache_lastmutatormsg = strzone("");
 
-       if (g_ca && autocvar_g_ca_spectate_enemies == -1)
-               observe_blocked = true;
-
        InitializeEntity(NULL, GameplayMode_DelayedInit, INITPRIO_GAMETYPE_FALLBACK);
 }