1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

fix Li's head missing. broke in cf2dc71a34

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.
This commit is contained in:
fgenesis 2023-12-29 22:43:05 +01:00
parent 66968836bc
commit 56169b7001

View file

@ -1460,24 +1460,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"));
@ -1587,6 +1569,26 @@ void SkeletalSprite::loadSkeletal(const std::string &fn)
grid->drawOrder = (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