if(vdist(player.velocity, >, e.speed))
player.velocity = normalize(player.velocity) * max(0, e.speed);
- if(!(teleporter.classname == "trigger_teleport" && teleporter.spawnflags & TELEPORT_KEEP_SPEED))
+ if(!(teleporter.classname == "trigger_teleport" && teleporter.spawnflags & TELEPORT_KEEP_SPEED) &&
+ !(teleporter.classname == "target_teleporter" && teleporter.spawnflags & 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));
#pragma once
-#define TELEPORT_SPECTATOR BIT(0) // q3df compat, also useful in xonotic
-#define TELEPORT_KEEP_SPEED BIT(1) // q3df compat, also useful in xonotic
+// q3df compat spawnflags, they may also be useful in xonotic
+
+// trigger_teleport
+#define TELEPORT_SPECTATOR BIT(0) // exists in q3 but is only documented in q3df
+#define TELEPORT_KEEP_SPEED BIT(1)
+
+// target_teleporter
+#define TELEPORTER_KEEP_SPEED BIT(0)