|
@@ -340,6 +340,24 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
|
|
|
self.floorOffset = floorOffset
|
|
self.floorOffset = floorOffset
|
|
|
self.reach = reach
|
|
self.reach = reach
|
|
|
|
|
|
|
|
|
|
+ def deleteCollisions(self):
|
|
|
|
|
+ assert(self.debugPrint("deleteCollisions()"))
|
|
|
|
|
+ del self.cTrav
|
|
|
|
|
+
|
|
|
|
|
+ if self.useHeightRay:
|
|
|
|
|
+ del self.cRayQueue
|
|
|
|
|
+ self.cRayNodePath.removeNode()
|
|
|
|
|
+ del self.cRayNodePath
|
|
|
|
|
+
|
|
|
|
|
+ if hasattr(self, "cSphere"):
|
|
|
|
|
+ del self.cSphere
|
|
|
|
|
+ self.cSphereNodePath.removeNode()
|
|
|
|
|
+ del self.cSphereNodePath
|
|
|
|
|
+
|
|
|
|
|
+ del self.pusher
|
|
|
|
|
+
|
|
|
|
|
+ self.getAirborneHeight = None
|
|
|
|
|
+
|
|
|
def setAirborneHeightFunc(self, getAirborneHeight):
|
|
def setAirborneHeightFunc(self, getAirborneHeight):
|
|
|
self.getAirborneHeight = getAirborneHeight
|
|
self.getAirborneHeight = getAirborneHeight
|
|
|
|
|
|
|
@@ -398,23 +416,6 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
|
|
|
self.physContactIndicator.lookAt(point)
|
|
self.physContactIndicator.lookAt(point)
|
|
|
return Task.cont
|
|
return Task.cont
|
|
|
|
|
|
|
|
- def deleteCollisions(self):
|
|
|
|
|
- assert(self.debugPrint("deleteCollisions()"))
|
|
|
|
|
- del self.cTrav
|
|
|
|
|
-
|
|
|
|
|
- if self.useHeightRay:
|
|
|
|
|
- del self.cRayQueue
|
|
|
|
|
- self.cRayNodePath.removeNode()
|
|
|
|
|
- del self.cRayNodePath
|
|
|
|
|
-
|
|
|
|
|
- del self.cSphere
|
|
|
|
|
- self.cSphereNodePath.removeNode()
|
|
|
|
|
- del self.cSphereNodePath
|
|
|
|
|
-
|
|
|
|
|
- del self.pusher
|
|
|
|
|
-
|
|
|
|
|
- del self.getAirborneHeight
|
|
|
|
|
-
|
|
|
|
|
def setCollisionsActive(self, active = 1):
|
|
def setCollisionsActive(self, active = 1):
|
|
|
assert(self.debugPrint("collisionsActive(active=%s)"%(active,)))
|
|
assert(self.debugPrint("collisionsActive(active=%s)"%(active,)))
|
|
|
if self.collisionsActive != active:
|
|
if self.collisionsActive != active:
|