Fix possible division by zero
This commit is contained in:
parent
b2d1f94adc
commit
d2a1144cf4
@ -400,7 +400,9 @@ void STKParticle::stimulateNormal(float dt, unsigned int active_count,
|
||||
{
|
||||
float dt_from_last_frame =
|
||||
glslFract(updated_lifetime) * lifetime_initial;
|
||||
float coeff = dt_from_last_frame / dt;
|
||||
float coeff = 0.0f;
|
||||
if (dt > 0.0f)
|
||||
coeff = dt_from_last_frame / dt;
|
||||
|
||||
m_previous_frame_matrix.transformVect(previous_frame_position,
|
||||
particle_position_initial);
|
||||
|
Loading…
Reference in New Issue
Block a user