From: Mario Date: Wed, 7 Feb 2018 02:06:58 +0000 (+1000) Subject: Reset viewloc when observing instead of constantly, should fix spectators seeing... X-Git-Tag: xonotic-v0.8.5~2344 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=55e756c1955737b8b3add2fb86cdb0c8c749e70f;p=xonotic%2Fxonotic-data.pk3dir.git Reset viewloc when observing instead of constantly, should fix spectators seeing in 1st person --- diff --git a/qcsrc/common/triggers/trigger/viewloc.qc b/qcsrc/common/triggers/trigger/viewloc.qc index 41394ac43..50bf3d05e 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qc +++ b/qcsrc/common/triggers/trigger/viewloc.qc @@ -17,7 +17,7 @@ void viewloc_think(entity this) // set myself as current viewloc where possible #if 1 - FOREACH_CLIENT(it.viewloc == this, + FOREACH_CLIENT(IS_PLAYER(it) && it.viewloc == this, { it.viewloc = NULL; }); diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 3333c04e4..3d5877f6b 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -352,6 +352,8 @@ void PutObserverInServer(entity this) this.weapons = '0 0 0'; this.drawonlytoclient = this; + this.viewloc = NULL; + this.weaponmodel = ""; for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) {