diff --git a/panda/src/particlesystem/particleSystem.I b/panda/src/particlesystem/particleSystem.I index f0292e230f..831a11fc0c 100644 --- a/panda/src/particlesystem/particleSystem.I +++ b/panda/src/particlesystem/particleSystem.I @@ -29,6 +29,18 @@ render(void) { _renderer->render(_physics_objects, _living_particles); } +//////////////////////////////////////////////////////////////////// +// Function : induce_labor +// Access : Public +// Description : Forces the birth of a particle litter this frame +// by resetting _tics_since_birth +//////////////////////////////////////////////////////////////////// + +INLINE void ParticleSystem:: +induce_labor(void) { + _tics_since_birth = _birth_rate; +} + //// /////////////////////////////////////////////////////// //// SET METHODS /////////////////////////////////////////////////////// //// /////////////////////////////////////////////////////// diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index 186c5739e5..51a64ff0a5 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -146,6 +146,7 @@ PUBLISHED: // methods INLINE void render(void); + INLINE void induce_labor(void); void update(float dt); public: