]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix teleporters resetting player's view when inside a vehicle despite not teleporting
authorMario <mario@smbclan.net>
Thu, 24 Mar 2016 17:32:06 +0000 (03:32 +1000)
committerMario <mario@smbclan.net>
Thu, 24 Mar 2016 17:32:06 +0000 (03:32 +1000)
qcsrc/lib/warpzone/server.qc

index 4f15d62123d366ad2c6d00bb5d4598798e817265..7444a5ded2af5d86ad9ab09804a2be013953b4c8 100644 (file)
@@ -873,7 +873,7 @@ void WarpZone_StartFrame()
                if(warpzone_warpzones_exist)
                        WarpZone_StoreProjectileData(it);
 
-               if((IS_OBSERVER(it) || it.solid == SOLID_NOT))
+               if(IS_OBSERVER(it) || it.solid == SOLID_NOT)
                if(IS_CLIENT(it)) // we don't care about it being a bot
                {
                        other = it; // player
@@ -888,10 +888,13 @@ void WarpZone_StartFrame()
                        }
 
                        // teleporters
-                       setself(Teleport_Find(it.origin + it.mins, it.origin + it.maxs));
-                       if (self)
-                       if (!WarpZoneLib_ExactTrigger_Touch())
-                               Simple_TeleportPlayer(self, other); // NOT triggering targets by this!
+                       if(other.teleportable)
+                       {
+                               setself(Teleport_Find(it.origin + it.mins, it.origin + it.maxs));
+                               if (self)
+                               if (!WarpZoneLib_ExactTrigger_Touch())
+                                       Simple_TeleportPlayer(self, other); // NOT triggering targets by this!
+                       }
                }
        });
        setself(this);