Browse Source

Added code to stash hull collision walls on a ship if it has any (only for the local player's ship)

Justin Butler 20 years ago
parent
commit
3ae7aedb67
1 changed files with 6 additions and 0 deletions
  1. 6 0
      direct/src/controls/ShipPilot.py

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

@@ -218,6 +218,12 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
 
 
             self.pusher.addCollider(self.cSternSphereNodePath, self.avatarNodePath)
             self.pusher.addCollider(self.cSternSphereNodePath, self.avatarNodePath)
 
 
+            # hide other things on my ship that these spheres might collide
+            # with and which I dont need anyways...
+            shipCollWall = self.avatarNodePath.hull.find("**/collision_hull")
+            if not shipCollWall.isEmpty():
+                shipCollWall.stash()
+            
     def takedownPhysics(self):
     def takedownPhysics(self):
         assert(self.debugPrint("takedownPhysics()"))
         assert(self.debugPrint("takedownPhysics()"))
         if hasattr(self, "phys"):
         if hasattr(self, "phys"):