From 55e756c1955737b8b3add2fb86cdb0c8c749e70f Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 7 Feb 2018 12:06:58 +1000 Subject: [PATCH] Reset viewloc when observing instead of constantly, should fix spectators seeing in 1st person --- qcsrc/common/triggers/trigger/viewloc.qc | 2 +- qcsrc/server/client.qc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.39.2