diff --git a/direct/src/fsm/FourStateAI.py b/direct/src/fsm/FourStateAI.py index e4cf18d151..d37b3ea1e8 100755 --- a/direct/src/fsm/FourStateAI.py +++ b/direct/src/fsm/FourStateAI.py @@ -137,6 +137,9 @@ class FourStateAI: def delete(self): assert(self.debugPrint("delete()")) + if self.doLaterTask is not None: + self.doLaterTask.remove() + del self.doLaterTask del self.states del self.fsm diff --git a/direct/src/showbase/NonPhysicsWalker.py b/direct/src/showbase/NonPhysicsWalker.py index 5574eda731..4aa3028f31 100755 --- a/direct/src/showbase/NonPhysicsWalker.py +++ b/direct/src/showbase/NonPhysicsWalker.py @@ -57,7 +57,7 @@ class NonPhysicsWalker(DirectObject.DirectObject): # Set up the collision sphere # This is a sphere on the ground to detect barrier collisions self.cSphere = CollisionSphere(0.0, 0.0, 0.0, avatarRadius) - cSphereNode = CollisionNode('cSphereNode') + cSphereNode = CollisionNode('NPW.cSphereNode') cSphereNode.addSolid(self.cSphere) self.cSphereNodePath = avatarNodePath.attachNewNode(cSphereNode) self.cSphereBitMask = wallCollideMask @@ -69,7 +69,7 @@ class NonPhysicsWalker(DirectObject.DirectObject): # This is a ray cast from your head down to detect floor polygons # A toon is about 4.0 feet high, so start it there self.cRay = CollisionRay(0.0, 0.0, 4.0, 0.0, 0.0, -1.0) - cRayNode = CollisionNode('cRayNode') + cRayNode = CollisionNode('NPW.cRayNode') cRayNode.addSolid(self.cRay) self.cRayNodePath = avatarNodePath.attachNewNode(cRayNode) self.cRayBitMask = floorCollideMask @@ -92,13 +92,13 @@ class NonPhysicsWalker(DirectObject.DirectObject): # and float above them as we go down. I increased this # from 8.0 to 16.0 to prevent this self.lifter.setMaxVelocity(16.0) - - # activate the collider with the traverser and pusher - self.setCollisionsActive(1) self.pusher.addCollider(self.cSphereNodePath, avatarNodePath) self.lifter.addCollider(self.cRayNodePath, avatarNodePath) + # activate the collider with the traverser and pusher + self.setCollisionsActive(1) + def setAirborneHeightFunc(self, getAirborneHeight): self.getAirborneHeight = getAirborneHeight @@ -130,6 +130,8 @@ class NonPhysicsWalker(DirectObject.DirectObject): # Now that we have disabled collisions, make one more pass # right now to ensure we aren't standing in a wall. self.oneTimeCollide() + print " cTrav.ls()" #*# + print self.cTrav #*# def oneTimeCollide(self): """ diff --git a/direct/src/showbase/PhysicsWalker.py b/direct/src/showbase/PhysicsWalker.py index 9407f36c47..7bc1f484c5 100755 --- a/direct/src/showbase/PhysicsWalker.py +++ b/direct/src/showbase/PhysicsWalker.py @@ -119,7 +119,7 @@ class PhysicsWalker(DirectObject.DirectObject): # This is a ray cast from your head down to detect floor polygons # A toon is about 4.0 feet high, so start it there self.cRay = CollisionRay(0.0, 0.0, 4.0, 0.0, 0.0, -1.0) - cRayNode = CollisionNode('cRayNode') + cRayNode = CollisionNode('PW.cRayNode') cRayNode.addSolid(self.cRay) self.cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode) self.cRayBitMask = floorBitmask @@ -189,7 +189,7 @@ class PhysicsWalker(DirectObject.DirectObject): if self.useHeightRay: centerHeight *= 2.0 self.cSphere = CollisionSphere(0.0, 0.0, centerHeight, avatarRadius) - cSphereNode = CollisionNode('cSphereNode') + cSphereNode = CollisionNode('PW.cSphereNode') cSphereNode.addSolid(self.cSphere) self.cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode) self.cSphereBitMask = bitmask