From 63ee8e35aed0ae6320928d4e689b7a79b6684d4c Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Thu, 8 Nov 2007 21:21:13 +0000 Subject: [PATCH] setting cNodePath to None in init and disable --- direct/src/controls/ShipPilot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/controls/ShipPilot.py b/direct/src/controls/ShipPilot.py index 565fb47a52..33f1f1eb60 100755 --- a/direct/src/controls/ShipPilot.py +++ b/direct/src/controls/ShipPilot.py @@ -55,6 +55,8 @@ class ShipPilot(PhysicsWalker): # acceleration as this increases. self.straightHeading = 0 + self.cNodePath = None + def setWalkSpeed(self, forward, jump, reverse, rotate): assert self.debugPrint("setWalkSpeed()") PhysicsWalker.setWalkSpeed(self, forward, 0, reverse, rotate) @@ -205,7 +207,7 @@ class ShipPilot(PhysicsWalker): """ if hasattr(self, "cNodePath"): self.cNodePath.removeNode() - del self.cNodePath + self.cNodePath = None del self.pusher