]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reset viewloc when observing instead of constantly, should fix spectators seeing...
authorMario <mario@smbclan.net>
Wed, 7 Feb 2018 02:06:58 +0000 (12:06 +1000)
committerMario <mario@smbclan.net>
Wed, 7 Feb 2018 02:06:58 +0000 (12:06 +1000)
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/server/client.qc

index 41394ac4318909a62f685c869fbf28970919c523..50bf3d05ee0b1e597a352f783fe0b376dd9dd2b3 100644 (file)
@@ -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;
        });
index 3333c04e49180286b6ef8806c91aa410baf0de1e..3d5877f6b0f0afc7247b0e4643169edfffbfbccd 100644 (file)
@@ -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)
        {