FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Emitters and paused/stopped state

Go down

Emitters and paused/stopped state Empty Emitters and paused/stopped state

Post  matt 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

http://elfrun.net

Back to top Go down

Back to top

- Similar topics

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