]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Merge branch 'z411/annce_queue' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index eb2ba1dcf7234831965879998894cedc3b0d13d6..58fda9a016cdc2b42cd0c5ef8622f9c28d699cae 100644 (file)
@@ -138,6 +138,8 @@ 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_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
 
@@ -2253,10 +2255,12 @@ void ObserverOrSpectatorThink(entity this)
                                }
                                CS(this).impulse = 0;
                        } else if(PHYS_INPUT_BUTTON_ATCK2(this)) {
-                               this.would_spectate = false;
-                               this.flags &= ~FL_JUMPRELEASED;
-                               TRANSMUTE(Observer, this);
-                               PutClientInServer(this);
+                               if(!observe_blocked_if_eliminated || !INGAME(this)) {
+                                       this.would_spectate = false;
+                                       this.flags &= ~FL_JUMPRELEASED;
+                                       TRANSMUTE(Observer, this);
+                                       PutClientInServer(this);
+                               }
                        } else if(!SpectateUpdate(this) && !SpectateNext(this)) {
                                PutObserverInServer(this, false, true);
                                this.would_spectate = true;