Browse Source

fixed an actor bug on cleanup

Asad M. Zaman 20 years ago
parent
commit
74d6a7265a
1 changed files with 5 additions and 5 deletions
  1. 5 5
      direct/src/actor/Actor.py

+ 5 - 5
direct/src/actor/Actor.py

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