mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-29 03:33:48 +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:
parent
66968836bc
commit
56169b7001
1 changed files with 20 additions and 18 deletions
|
@ -1460,24 +1460,6 @@ void SkeletalSprite::loadSkeletal(const std::string &fn)
|
||||||
e->load(pfile);
|
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"))
|
if (bone->Attribute("pass"))
|
||||||
{
|
{
|
||||||
int pass = atoi(bone->Attribute("pass"));
|
int pass = atoi(bone->Attribute("pass"));
|
||||||
|
@ -1587,6 +1569,26 @@ void SkeletalSprite::loadSkeletal(const std::string &fn)
|
||||||
grid->drawOrder = (GridDrawOrder)ord;
|
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");
|
bone = bone->NextSiblingElement("Bone");
|
||||||
}
|
}
|
||||||
// attach bones
|
// attach bones
|
||||||
|
|
Loading…
Reference in a new issue