Преглед изворни кода

direct: Fix actor initialization

Daniel пре 5 година
родитељ
комит
acbf265e54
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      direct/src/actor/Actor.py

+ 4 - 2
direct/src/actor/Actor.py

@@ -163,8 +163,10 @@ class Actor(DirectObject, NodePath):
             #the actor for a few frames, otherwise it has no effect
             a.fixBounds()
         """
-        if not hasattr(self, 'Actor_initialized'):
-            self.Actor_initialized = 1
+        if hasattr(self, 'Actor_initialized'):
+            return
+
+        self.Actor_initialized = 1
 
         # initialize our NodePath essence
         NodePath.__init__(self)