]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Renamed observe_blocked variable
authorz411 <z411@omaera.org>
Thu, 20 Oct 2022 22:00:27 +0000 (19:00 -0300)
committerz411 <z411@omaera.org>
Thu, 20 Oct 2022 22:00:27 +0000 (19:00 -0300)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh
qcsrc/server/client.qc
qcsrc/server/world.qh

index d5d5e5ccad23170663d24f8bc3ca79d267038145..b14a0f52676bb919acb77d3a11a1ca6ba1db4dc6 100644 (file)
@@ -40,7 +40,7 @@ REGISTER_MUTATOR(ca, false)
                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;
+                       observe_blocked_if_eliminated = true;
 
                ca_teams = BITS(bound(2, ca_teams, 4));
         GameRules_scoring(ca_teams, SFL_SORT_PRIO_PRIMARY, 0, {
index 4a4d157b4c2c98d1361d0beb2d6d387f7645a60e..58fda9a016cdc2b42cd0c5ef8622f9c28d699cae 100644 (file)
@@ -138,7 +138,7 @@ bool ClientData_Send(entity this, entity to, int sf)
        if (CS(e).race_completed)       sf |= BIT(0); // forced scoreboard
        if (CS(to).spectatee_status)    sf |= BIT(1); // spectator ent number follows
        if (CS(e).zoomstate)            sf |= BIT(2); // zoomed
-       if (observe_blocked && INGAME(to))
+       if (observe_blocked_if_eliminated && INGAME(to))
                                        sf |= BIT(3); // observing blocked
        if (autocvar_sv_showspectators == 1 || (autocvar_sv_showspectators && IS_SPEC(to)))
                                        sf |= BIT(4); // show spectators
@@ -2255,7 +2255,7 @@ void ObserverOrSpectatorThink(entity this)
                                }
                                CS(this).impulse = 0;
                        } else if(PHYS_INPUT_BUTTON_ATCK2(this)) {
-                               if(!observe_blocked || !INGAME(this)) {
+                               if(!observe_blocked_if_eliminated || !INGAME(this)) {
                                        this.would_spectate = false;
                                        this.flags &= ~FL_JUMPRELEASED;
                                        TRANSMUTE(Observer, this);
index 7ceb398d029b92d45b9b98139cd08ff6e1cbdd12..57b240d2abe0985a703ec0f8d12cf6d8c3b5219b 100644 (file)
@@ -165,4 +165,4 @@ void droptofloor(entity this);
 IntrusiveList g_moveables;
 STATIC_INIT(g_moveables) { g_moveables = IL_NEW(); }
 
-bool observe_blocked = false;
+bool observe_blocked_if_eliminated = false; // forbids eliminated players from observing