[nexuiz-commits] r7157 - in trunk/data: qcsrc/server scripts
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jul 8 09:25:07 EDT 2009
Author: div0
Date: 2009-07-08 09:25:07 -0400 (Wed, 08 Jul 2009)
New Revision: 7157
Modified:
trunk/data/qcsrc/server/t_teleporters.qc
trunk/data/scripts/entities.def
Log:
misc_teleport_dest: allow setting a max speed for players who get teleported
Modified: trunk/data/qcsrc/server/t_teleporters.qc
===================================================================
--- trunk/data/qcsrc/server/t_teleporters.qc 2009-07-08 09:02:58 UTC (rev 7156)
+++ trunk/data/qcsrc/server/t_teleporters.qc 2009-07-08 13:25:07 UTC (rev 7157)
@@ -158,6 +158,10 @@
sprint(other, "Teleport destination vanished. Sorry... please complain to the mapper.\n");
}
+ if(e.speed)
+ if(vlen(other.velocity > e.speed)
+ other.velocity = normalize(other.velocity) * max(0, e.speed);
+
TeleportPlayer(self, other, e.origin + '0 0 1' * (1 - other.mins_z - 24), e.mangle, v_forward * vlen(other.velocity), '0 0 0', '0 0 0');
if(e.target)
Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def 2009-07-08 09:02:58 UTC (rev 7156)
+++ trunk/data/scripts/entities.def 2009-07-08 13:25:07 UTC (rev 7157)
@@ -839,6 +839,7 @@
angle: direction in which player will look when teleported, OR use
angles: pitch and yaw when coming out of the teleporter (also specifies the direction the player will aim when coming out)
cnt: weight for random selection, in case a teleporter points at multiple misc_teleporter_dest
+speed: maximum speed cap for the teleported player (if -1, teleported players will have no speed)
*/
/*QUAKED onslaught_controlpoint (0 .5 .8) (-32 -32 0) (32 32 128)
More information about the nexuiz-commits
mailing list