diff --git a/BBGE/SkeletalSprite.cpp b/BBGE/SkeletalSprite.cpp index e523657..47cc579 100644 --- a/BBGE/SkeletalSprite.cpp +++ b/BBGE/SkeletalSprite.cpp @@ -1461,24 +1461,6 @@ void SkeletalSprite::loadSkeletal(const std::string &fn) e->load(pfile); } } - XMLElement *fr=0; - fr = bone->FirstChildElement("Frame"); - int frc=0; - while(fr) - { - std::string gfx; - if (fr->Attribute("gfx")) - { - gfx = fr->Attribute("gfx"); - newb->addFrame(gfx); - } - fr = fr->NextSiblingElement("Frame"); - frc++; - } - if (frc) - { - newb->showFrame(0); - } if (bone->Attribute("pass")) { int pass = atoi(bone->Attribute("pass")); @@ -1588,6 +1570,26 @@ void SkeletalSprite::loadSkeletal(const std::string &fn) grid->setDrawOrder((GridDrawOrder)ord); } } + if(XMLElement *fr = bone->FirstChildElement("Frame")) + { + int frc = 0; + while(fr) + { + std::string gfx; + if (fr->Attribute("gfx")) + { + gfx = fr->Attribute("gfx"); + newb->addFrame(gfx); + } + fr = fr->NextSiblingElement("Frame"); + frc++; + } + if (frc) + { + newb->showFrame(0); + } + newb->renderQuad = true; + } bone = bone->NextSiblingElement("Bone"); } // attach bones