Changeset 4001 in orxonox.OLD for orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
- Timestamp:
- Apr 28, 2005, 12:04:34 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
r3974 r4001 124 124 // saving the time 125 125 float count = (dt+this->saveTime) * this->emissionRate; 126 this->saveTime = modff(count, &count); 127 this->saveTime /= this->emissionRate; 126 this->saveTime = modff(count, &count) / this->emissionRate; 128 127 PRINTF(5)("emitting %f particles, saving %f seconds for the next round\n", count, this->saveTime); 129 128 … … 137 136 randDir.normalize(); 138 137 randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir)).apply(this->direction); 139 randDir = randDir.getNormalized()*velocity + inheritVelocity;138 Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity; 140 139 141 system->addParticle(this->getAbsCoor(), randDir);140 system->addParticle(this->getAbsCoor(), velocityV); 142 141 } 143 142 }
Note: See TracChangeset
for help on using the changeset viewer.