mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
setting cNodePath to None in init and disable
This commit is contained in:
parent
a2baa6e78c
commit
63ee8e35ae
@ -55,6 +55,8 @@ class ShipPilot(PhysicsWalker):
|
|||||||
# acceleration as this increases.
|
# acceleration as this increases.
|
||||||
self.straightHeading = 0
|
self.straightHeading = 0
|
||||||
|
|
||||||
|
self.cNodePath = None
|
||||||
|
|
||||||
def setWalkSpeed(self, forward, jump, reverse, rotate):
|
def setWalkSpeed(self, forward, jump, reverse, rotate):
|
||||||
assert self.debugPrint("setWalkSpeed()")
|
assert self.debugPrint("setWalkSpeed()")
|
||||||
PhysicsWalker.setWalkSpeed(self, forward, 0, reverse, rotate)
|
PhysicsWalker.setWalkSpeed(self, forward, 0, reverse, rotate)
|
||||||
@ -205,7 +207,7 @@ class ShipPilot(PhysicsWalker):
|
|||||||
"""
|
"""
|
||||||
if hasattr(self, "cNodePath"):
|
if hasattr(self, "cNodePath"):
|
||||||
self.cNodePath.removeNode()
|
self.cNodePath.removeNode()
|
||||||
del self.cNodePath
|
self.cNodePath = None
|
||||||
|
|
||||||
del self.pusher
|
del self.pusher
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user