Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 23, 2005, 4:01:07 AM (19 years ago)
Author:
bensch
Message:

orxonox/brnaches/particleEngine: multiple emitions into one ParticleSystem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_engine.cc

    r3935 r3937  
    8282void ParticleEngine::addConnection(ParticleEmitter* emitter, ParticleSystem* system)
    8383{
     84  // look, if we have already added this connection
     85  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
     86  ParticleConnection* tmpConnection = tmpConIt->nextElement();
     87  while(tmpConnection)
     88    {
     89      if (tmpConnection->emitter == emitter && tmpConnection->system == system)
     90        {
     91          PRINTF(2)("Connection between Emitter and System already added\n");
     92          delete tmpConIt;
     93          return;
     94        }
     95     
     96      tmpConnection = tmpConIt->nextElement();
     97    }
     98  delete tmpConIt;
     99 
     100
     101
    84102  ParticleConnection* tmpCon = new ParticleConnection;
    85103  tmpCon->emitter = emitter;
     
    93111{
    94112  this->systemList->remove(system);
    95  
    96113}
    97114
Note: See TracChangeset for help on using the changeset viewer.