Browse Source

no onscreen debug in optimize mode

Joe Shochet 21 years ago
parent
commit
c17748953a
1 changed files with 6 additions and 5 deletions
  1. 6 5
      direct/src/controls/ShipPilot.py

+ 6 - 5
direct/src/controls/ShipPilot.py

@@ -292,7 +292,7 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
         self.cTrav = collisionTraverser
         self.floorOffset = floorOffset = 7.0
         self.wallBitmask = wallBitmask
-        self.floorBitmask = BitMask32().allOff() #*#floorBitmask
+        self.floorBitmask = floorBitmask
         self.avatarRadius = avatarRadius
         self.floorOffset = floorOffset
         self.reach = reach
@@ -738,10 +738,11 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
 
             newVector.normalize()
             newVector *= maxLen
-            onScreenDebug.add("newVector",
-                newVector)
-            onScreenDebug.add("newVector length",
-                newVector.length())
+            if __debug__:
+                onScreenDebug.add("newVector",
+                                  newVector)
+                onScreenDebug.add("newVector length",
+                                  newVector.length())
             self.acForce.setVector(Vec3(newVector))