From: z411 Date: Thu, 20 Oct 2022 22:00:27 +0000 (-0300) Subject: Renamed observe_blocked variable X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=feba916c5488b3cef9eedc30c91cdf1bd59314bf;p=xonotic%2Fxonotic-data.pk3dir.git Renamed observe_blocked variable --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh index d5d5e5cca..b14a0f526 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qh @@ -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, { diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 4a4d157b4..58fda9a01 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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); diff --git a/qcsrc/server/world.qh b/qcsrc/server/world.qh index 7ceb398d0..57b240d2a 100644 --- a/qcsrc/server/world.qh +++ b/qcsrc/server/world.qh @@ -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