mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
- attempt to improve loading of fire particle
This commit is contained in:
parent
99e315b1cb
commit
cbf9a305c5
@ -5263,7 +5263,6 @@ Unit * Unit::loadGame(const XmlNode *rootNode, GameSettings *settings, Faction *
|
|||||||
//result->fire->setTexture(CoreData::getInstance().getFireTexture());
|
//result->fire->setTexture(CoreData::getInstance().getFireTexture());
|
||||||
result->fireParticleSystems.push_back(result->fire);
|
result->fireParticleSystems.push_back(result->fire);
|
||||||
|
|
||||||
//Renderer::getInstance().manageParticleSystem(result->fire, rsGame);
|
|
||||||
Renderer::getInstance().addToDeferredParticleSystemList(make_pair(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) {
|
for(int i = 0; i < (int)unitParticleSystemNodeList.size(); ++i) {
|
||||||
XmlNode *node = unitParticleSystemNodeList[i];
|
XmlNode *node = unitParticleSystemNodeList[i];
|
||||||
|
|
||||||
FireParticleSystem *ups = new FireParticleSystem();
|
if(linkFireIndex != i) {
|
||||||
ups->loadGame(node);
|
FireParticleSystem *ups = new FireParticleSystem();
|
||||||
//ups->setTexture(CoreData::getInstance().getFireTexture());
|
ups->setParticleOwner(result);
|
||||||
result->fireParticleSystems.push_back(ups);
|
ups->loadGame(node);
|
||||||
|
//ups->setTexture(CoreData::getInstance().getFireTexture());
|
||||||
|
result->fireParticleSystems.push_back(ups);
|
||||||
|
|
||||||
if(linkFireIndex >= 0 && linkFireIndex == i) {
|
//if(linkFireIndex >= 0 && linkFireIndex == i) {
|
||||||
result->fire = ups;
|
// result->fire = ups;
|
||||||
|
//}
|
||||||
|
Renderer::getInstance().addToDeferredParticleSystemList(make_pair(ups, rsGame));
|
||||||
}
|
}
|
||||||
//Renderer::getInstance().manageParticleSystem(result->fire, rsGame);
|
|
||||||
Renderer::getInstance().addToDeferredParticleSystemList(make_pair(ups, rsGame));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1452,7 +1452,7 @@ void UnitParticleSystem::loadGame(const XmlNode *rootNode) {
|
|||||||
// Vec3f windSpeed;
|
// Vec3f windSpeed;
|
||||||
windSpeed = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("windSpeed")->getValue());
|
windSpeed = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("windSpeed")->getValue());
|
||||||
// Vec3f cRotation;
|
// Vec3f cRotation;
|
||||||
windSpeed = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("cRotation")->getValue());
|
cRotation = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("cRotation")->getValue());
|
||||||
// Vec3f fixedAddition;
|
// Vec3f fixedAddition;
|
||||||
fixedAddition = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("fixedAddition")->getValue());
|
fixedAddition = Vec3f::strToVec3(unitParticleSystemNode->getAttribute("fixedAddition")->getValue());
|
||||||
// Vec3f oldPosition;
|
// Vec3f oldPosition;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user