]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/teleporters.qc
q3df teleporter flags
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / teleporters.qc
index c8f9ad245d0ca7c24a7311de92005e62dc9acb16..b9698446c2e67f6b4b9d214e047a3559d5a1c50d 100644 (file)
@@ -223,9 +223,11 @@ entity Simple_TeleportPlayer(entity teleporter, entity player)
                if(vdist(player.velocity, >, e.speed))
                        player.velocity = normalize(player.velocity) * max(0, e.speed);
 
-       if(STAT(TELEPORT_MAXSPEED, player))
-               if(vdist(player.velocity, >, STAT(TELEPORT_MAXSPEED, player)))
-                       player.velocity = normalize(player.velocity) * max(0, STAT(TELEPORT_MAXSPEED, player));
+       if(!(teleporter.classname == "trigger_teleport" && teleporter.spawnflags & TELEPORT_KEEP_SPEED) &&
+          !(teleporter.classname == "target_teleporter" && teleporter.spawnflags & TARGET_TELEPORTER_KEEP_SPEED))
+               if(STAT(TELEPORT_MAXSPEED, player))
+                       if(vdist(player.velocity, >, STAT(TELEPORT_MAXSPEED, player)))
+                               player.velocity = normalize(player.velocity) * max(0, STAT(TELEPORT_MAXSPEED, player));
 
        locout = e.origin + '0 0 1' * (1 - player.mins.z - 24);