ActionDef: Append based on parsing the subelement, not the element.
[python-bulletml.git] / bulletml / parser.py
index 529876b..187fa86 100644 (file)
@@ -205,9 +205,9 @@ class BulletDef(object):
             elif tag == "speed":
                 self.speed = Speed(doc, subelem)
             elif tag == "action":
             elif tag == "speed":
                 self.speed = Speed(doc, subelem)
             elif tag == "action":
-                self.actions.append(ActionDef(doc, element))
+                self.actions.append(ActionDef(doc, subelem))
             elif tag == "actionRef":
             elif tag == "actionRef":
-                self.actions.append(ActionRef(doc, element))
+                self.actions.append(ActionRef(doc, subelem))
 
     def __call__(self, params, rank):
         actions = []
 
     def __call__(self, params, rank):
         actions = []