fixed an actor bug on cleanup
This commit is contained in:
parent
8ecd64e785
commit
74d6a7265a
|
|
@ -631,17 +631,17 @@ class Actor(DirectObject, NodePath):
|
|||
Actor.notify.warning("no lod named: %s" % (lodName))
|
||||
return
|
||||
|
||||
# remove the part
|
||||
if (partBundleDict.has_key(partName)):
|
||||
partBundleDict[partName].removeNode()
|
||||
del(partBundleDict[partName])
|
||||
|
||||
# find the corresponding anim control dict
|
||||
animControlDict = self.__animControlDict.get(lodName)
|
||||
if not animControlDict:
|
||||
Actor.notify.warning("no lod named: %s" % (lodName))
|
||||
return
|
||||
|
||||
# remove the part
|
||||
if (partBundleDict.has_key(partName)):
|
||||
partBundleDict[partName].removeNode()
|
||||
del(partBundleDict[partName])
|
||||
|
||||
# remove the animations
|
||||
if (animControlDict.has_key(partName)):
|
||||
del(animControlDict[partName])
|
||||
|
|
|
|||
Loading…
Reference in New Issue