From abd1a41291ec7559a4afe203e4b5206800a64823 Mon Sep 17 00:00:00 2001 From: greytower <> Date: Wed, 14 Dec 2005 19:53:38 +0000 Subject: [PATCH] Damage to ship sails now decrease its speed --- direct/src/controls/ShipPilot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direct/src/controls/ShipPilot.py b/direct/src/controls/ShipPilot.py index 598ad91493..b8fc295b13 100755 --- a/direct/src/controls/ShipPilot.py +++ b/direct/src/controls/ShipPilot.py @@ -89,7 +89,7 @@ class ShipPilot(PhysicsWalker.PhysicsWalker): #*# Debug: if not hasattr(ship, "acceleration"): self.ship.acceleration = 60 - self.ship.maxSpeed = 12 + self.ship.maxSpeed = 14 self.ship.reverseAcceleration = 10 self.ship.maxReverseSpeed = 2 self.ship.turnRate = 3 @@ -887,6 +887,10 @@ class ShipPilot(PhysicsWalker.PhysicsWalker): speed *= self.ship.maxReverseSpeed #speed *= 1.0 - dt * 0.05 + + # modify based on sail damage + speed *= self.ship.Sp + speed /= self.ship.maxSp physObject.setVelocity(speed) #rotMat=Mat3.rotateMatNormaxis(self.avatarNodePath.getH(), Vec3.up())