From 9faee6cf796ccac4ae0918c4e110107a1717dc6b Mon Sep 17 00:00:00 2001 From: fgenesis Date: Fri, 29 Dec 2023 22:43:05 +0100 Subject: [PATCH] fix Li's head missing. broke in cf2dc71a341b00f6463 rq=0 used to hide the base head gfx to only show frames. but rq=0 is not what we want after consolidating those extra quads into the base quad. so in order to keep backwards compat, unhide a bone if it has frame tiles. --- BBGE/SkeletalSprite.cpp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) 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