1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-04 02:24:00 +00:00

Fix bone particles broken in 8472718fb7

This commit is contained in:
fgenesis 2016-08-02 02:44:50 +02:00
parent 2d47b4a7b3
commit 00900a9dfb

View file

@ -1316,17 +1316,19 @@ void SkeletalSprite::loadSkeletal(const std::string &fn)
std::string pfile; std::string pfile;
while (is >> slot) while (is >> slot)
{ {
if(slot > 0) if(slot < 0)
{ {
is >> pfile; errorLog("particle slot < 0");
// add particle system + load break;
ParticleEffect *e = new ParticleEffect;
if(newb->emitters.size() < (size_t)slot)
newb->emitters.resize(slot+4);
newb->emitters[slot] = e;
newb->addChild(e, PM_POINTER);
e->load(pfile);
} }
is >> pfile;
// add particle system + load
ParticleEffect *e = new ParticleEffect;
if(newb->emitters.size() <= (size_t)slot)
newb->emitters.resize(slot+4, NULL);
newb->emitters[slot] = e;
newb->addChild(e, PM_POINTER);
e->load(pfile);
} }
} }
XMLElement *fr=0; XMLElement *fr=0;