diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 7248101b..3ff791e3 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -5263,7 +5263,6 @@ Unit * Unit::loadGame(const XmlNode *rootNode, GameSettings *settings, Faction * //result->fire->setTexture(CoreData::getInstance().getFireTexture()); result->fireParticleSystems.push_back(result->fire); - //Renderer::getInstance().manageParticleSystem(result->fire, rsGame); Renderer::getInstance().addToDeferredParticleSystemList(make_pair(result->fire, rsGame)); } @@ -5388,16 +5387,18 @@ Unit * Unit::loadGame(const XmlNode *rootNode, GameSettings *settings, Faction * for(int i = 0; i < (int)unitParticleSystemNodeList.size(); ++i) { XmlNode *node = unitParticleSystemNodeList[i]; - FireParticleSystem *ups = new FireParticleSystem(); - ups->loadGame(node); - //ups->setTexture(CoreData::getInstance().getFireTexture()); - result->fireParticleSystems.push_back(ups); + if(linkFireIndex != i) { + FireParticleSystem *ups = new FireParticleSystem(); + ups->setParticleOwner(result); + ups->loadGame(node); + //ups->setTexture(CoreData::getInstance().getFireTexture()); + result->fireParticleSystems.push_back(ups); - if(linkFireIndex >= 0 && linkFireIndex == i) { - result->fire = ups; + //if(linkFireIndex >= 0 && linkFireIndex == i) { + // result->fire = ups; + //} + Renderer::getInstance().addToDeferredParticleSystemList(make_pair(ups, rsGame)); } - //Renderer::getInstance().manageParticleSystem(result->fire, rsGame); - Renderer::getInstance().addToDeferredParticleSystemList(make_pair(ups, rsGame)); } } diff --git a/source/shared_lib/sources/graphics/particle.cpp b/source/shared_lib/sources/graphics/particle.cpp index 36d9334d..58386a0f 100644 --- a/source/shared_lib/sources/graphics/particle.cpp +++ b/source/shared_lib/sources/graphics/particle.cpp @@ -1452,7 +1452,7 @@ void UnitParticleSystem::loadGame(const XmlNode *rootNode) { // Vec3f windSpeed; windSpeed = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("windSpeed")->getValue()); // Vec3f cRotation; - windSpeed = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("cRotation")->getValue()); + cRotation = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("cRotation")->getValue()); // Vec3f fixedAddition; fixedAddition = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("fixedAddition")->getValue()); // Vec3f oldPosition;