Showing the changes to interface/src/ParticleSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -24,18 +24,20 @@ ParticleSystem::ParticleSystem() { · 23 unmodified lines | ||
| 24 | 24 | _upDirection = glm::vec3(0.0f, 1.0f, 0.0f); // default |
| 25 | 25 | |
| 26 | 26 | for (unsigned int emitterIndex = 0; emitterIndex < MAX_EMITTERS; emitterIndex++) { |
| 27 | − | |
| 28 | − _emitter[emitterIndex].position = glm::vec3(0.0f, 0.0f, 0.0f); | |
| 29 | − _emitter[emitterIndex].direction = glm::vec3(0.0f, 1.0f, 0.0f); | |
| 30 | − _emitter[emitterIndex].visible = false; | |
| 31 | − _emitter[emitterIndex].particleResolution = DEFAULT_PARTICLE_SPHERE_RESOLUTION; | |
| 32 | − _emitter[emitterIndex].particleLifespan = DEFAULT_PARTICLE_LIFESPAN; | |
| 33 | − _emitter[emitterIndex].showingBaseParticle = false; | |
| 34 | − _emitter[emitterIndex].emitReserve = 0.0; | |
| 35 | − _emitter[emitterIndex].thrust = 0.0f; | |
| 36 | − _emitter[emitterIndex].rate = 0.0f; | |
| 37 | − _emitter[emitterIndex].currentParticle = 0; | |
| 38 | − _emitter[emitterIndex].particleRenderStyle = PARTICLE_RENDER_STYLE_SPHERE; | |
| 27 | + | |
| 28 | + Emitter e = _emitter[emitterIndex]; | |
| 29 | + | |
| 30 | + e.position = glm::vec3(0.0f, 0.0f, 0.0f); | |
| 31 | + e.direction = glm::vec3(0.0f, 1.0f, 0.0f); | |
| 32 | + e.visible = false; | |
| 33 | + e.particleResolution = DEFAULT_PARTICLE_SPHERE_RESOLUTION; | |
| 34 | + e.particleLifespan = DEFAULT_PARTICLE_LIFESPAN; | |
| 35 | + e.showingBaseParticle = false; | |
| 36 | + e.emitReserve = 0.0; | |
| 37 | + e.thrust = 0.0f; | |
| 38 | + e.rate = 0.0f; | |
| 39 | + e.currentParticle = 0; | |
| 40 | + e.particleRenderStyle = PARTICLE_RENDER_STYLE_SPHERE; | |
| 39 | 41 | |
| 40 | 42 | for (int lifeStage = 0; lifeStage<NUM_PARTICLE_LIFE_STAGES; lifeStage++) { |
| 41 | 43 | |