r4861 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Oct 24 05:25:11 EDT 2008


Author: div0
Date: 2008-10-24 05:25:09 -0400 (Fri, 24 Oct 2008)
New Revision: 4861

Modified:
   trunk/data/qcsrc/server/g_subs.qc
Log:
add SUB_Friction (currently only used by target_spawn)


Modified: trunk/data/qcsrc/server/g_subs.qc
===================================================================
--- trunk/data/qcsrc/server/g_subs.qc	2008-10-24 09:06:45 UTC (rev 4860)
+++ trunk/data/qcsrc/server/g_subs.qc	2008-10-24 09:25:09 UTC (rev 4861)
@@ -26,6 +26,20 @@
 
 /*
 ==================
+SUB_Friction
+
+Applies some friction to self
+==================
+*/
+.float friction;
+void SUB_Friction (void)
+{
+	self.nextthink = time;
+	self.velocity = self.velocity * (1 - frametime * self.friction);
+}
+
+/*
+==================
 SUB_VanishOrRemove
 
 Makes client invisible or removes non-client




More information about the nexuiz-commits mailing list