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->fireParticleSystems.push_back(result->fire);
|
||||
|
||||
//Renderer::getInstance().manageParticleSystem(result->fire, rsGame);
|
||||
Renderer::getInstance().addToDeferredParticleSystemList(make_pair(result->fire, rsGame));
|
||||
}
|
||||
|
||||
@ -5388,18 +5387,20 @@ Unit * Unit::loadGame(const XmlNode *rootNode, GameSettings *settings, Faction *
|
||||
for(int i = 0; i < (int)unitParticleSystemNodeList.size(); ++i) {
|
||||
XmlNode *node = unitParticleSystemNodeList[i];
|
||||
|
||||
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;
|
||||
}
|
||||
//Renderer::getInstance().manageParticleSystem(result->fire, rsGame);
|
||||
//if(linkFireIndex >= 0 && linkFireIndex == i) {
|
||||
// result->fire = ups;
|
||||
//}
|
||||
Renderer::getInstance().addToDeferredParticleSystemList(make_pair(ups, rsGame));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vector<UnitParticleSystem*> smokeParticleSystems;
|
||||
// for(unsigned int i = 0; i < smokeParticleSystems.size(); ++i) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user