fixed an actor bug on cleanup

This commit is contained in:
Asad M. Zaman 2006-01-11 00:34:52 +00:00
parent 8ecd64e785
commit 74d6a7265a
1 changed files with 5 additions and 5 deletions

View File

@ -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])