diff skaapsteker/physics.py @ 624:83569a6b3ad8

Fix StartingDoorway and velocity clamping.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 07 May 2011 14:40:04 +0200
parents 65881746dc20
children 65882990b9cf
line wrap: on
line diff
--- a/skaapsteker/physics.py	Sat May 07 13:59:00 2011 +0200
+++ b/skaapsteker/physics.py	Sat May 07 14:40:04 2011 +0200
@@ -54,11 +54,10 @@
 
 
     def deltav(self, dv):
-        velocity = cadd(self.velocity, dv)
-        self.velocity = cclamp(velocity, self.terminal_velocity)
-
+        self.velocity = cadd(self.velocity, dv)
 
     def deltap(self, dt):
+        self.velocity = cclamp(self.velocity, self.terminal_velocity)
         old_pos = self.rect.center
         self._float_pos = cadd(self._float_pos, cmul(self.velocity, dt))
         self.rect.center = cint(self._float_pos)