From 731597ff4e5b2143f8bc9e4b0a8fe2f6ce2a275d Mon Sep 17 00:00:00 2001 From: titison Date: Wed, 23 Jul 2014 21:24:43 +0200 Subject: [PATCH] Fix animationbound-particles --- source/glest_game/types/skill_type.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index f7a13a31..00b6bba1 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -504,11 +504,18 @@ void SkillType::load(const XmlNode *sn, const XmlNode *attackBoostsNode, unitParticleSystemType->load(particleFileNode, dir, currentPath + path, &Renderer::getInstance(), loadedFileList,parentLoader,tt->getPath()); - if(particleNode->getAttribute("start-time",false) != NULL) { + if (particleNode->getChild(i)->hasAttribute("start-time")) { + //printf("*NOTE particle system type has start-time [%f]\n",particleNode->getAttribute("start-time")->getFloatValue()); + unitParticleSystemType->setStartTime(particleNode->getChild(i)->getAttribute("start-time")->getFloatValue()); + } else if (particleNode->hasAttribute("start-time")) { //printf("*NOTE particle system type has start-time [%f]\n",particleNode->getAttribute("start-time")->getFloatValue()); unitParticleSystemType->setStartTime(particleNode->getAttribute("start-time")->getFloatValue()); } - if(particleNode->getAttribute("end-time",false) != NULL) { + + if (particleNode->getChild(i)->hasAttribute("end-time")) { + //printf("*NOTE particle system type has start-time [%f]\n",particleNode->getAttribute("start-time")->getFloatValue()); + unitParticleSystemType->setEndTime(particleNode->getChild(i)->getAttribute("end-time")->getFloatValue()); + } else if (particleNode->hasAttribute("end-time")) { //printf("*NOTE particle system type has end-time [%f]\n",particleNode->getAttribute("end-time")->getFloatValue()); unitParticleSystemType->setEndTime(particleNode->getAttribute("end-time")->getFloatValue()); }