Emitters and paused/stopped state

View previous topic View next topic Go down

Emitters and paused/stopped state

Post  matt on Mon Nov 10, 2008 4:33 pm

In sio2_emitter.c / sio2EmitterRender, the code looks like:

Code:
   if( _SIO2emitter->state == SIO2_EMITTER_PLAY )
   {
      // ...
      // Spawn new particles if necessary
      // ...
   }
   else
   { return; }
With regard to the SIO2_EMITTER_PAUSE state, I think the return in the if condition is wrong. Existing particles still need to be updated since not the whole emitter was destroyed but just paused from emitting.

Personally, I'd suggest to only have a play and stop state where the first keeps emitting and the latter only updates existing particles, and then change the code to:

Code:
   // ...
   else if (_SIO2emitter->n_particle == 0) // Nothing to update
   { return; }

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum