[nexuiz-commits] r7615 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Sep 3 16:03:10 EDT 2009


Author: div0
Date: 2009-09-03 16:03:07 -0400 (Thu, 03 Sep 2009)
New Revision: 7615

Modified:
   trunk/data/qcsrc/server/g_triggers.qc
Log:
trigger_impulse: make it sane again (strength 1 = identity, <1 = slow down, >1 = speedup, the value is the speed change factor PER SECOND)


Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2009-09-03 17:03:19 UTC (rev 7614)
+++ trunk/data/qcsrc/server/g_triggers.qc	2009-09-03 20:03:07 UTC (rev 7615)
@@ -1173,11 +1173,8 @@
     other.lastpushtime = time;
     if(!pushdeltatime) return;
 
-    // LordHavoc: rewrote this velocity math (was * self.strength * pushdeltatime) to make it less ticrate dependent
-    //if(self.strength > 1)
-        other.velocity = other.velocity * (1 + (self.strength - 20) * pushdeltatime);
-    //else
-    //    other.velocity = other.velocity - (other.velocity * self.strength * pushdeltatime);
+    // div0: ticrate independent, 1 = identity (not 20)
+    other.velocity = other.velocity * pow(self.strength, * pushdeltatime);
 }
 
 // Spherical (gravity/repulsor) mode



More information about the nexuiz-commits mailing list