enabling ~run and ~turbo again

This commit is contained in:
Josh Wilson 2007-08-29 20:15:41 +00:00
parent 89dd1fc294
commit 142aa57cdf
1 changed files with 5 additions and 4 deletions

View File

@ -441,9 +441,9 @@ class ShipPilot(PhysicsWalker):
physVel = physObject.getVelocity()
physVelLen = physVel.length()
if (physVelLen!=0.
or self.__speed
or self.__slideSpeed
or self.__rotationSpeed):
or self.__speed
or self.__slideSpeed
or self.__rotationSpeed):
# don't factor in dt, the physics system will do that
distance = self.__speed #dt * self.__speed
goForward = True
@ -472,7 +472,8 @@ class ShipPilot(PhysicsWalker):
maxLen = self.ship.acceleration
else:
maxLen = self.ship.reverseAcceleration
if newVector.length() > maxLen:
if newVector.length() > maxLen and \
not (debugRunning or base.localAvatar.getTurbo()):
newVector.normalize()
newVector *= maxLen