Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Fix particles emitting when emitting is set to false in scene
Browse files Browse the repository at this point in the history
Caused by godotengine#10297 calling particles_restart() on the same frame as the one set_emitting(false) is called. The rasterizer would wait a frame, and then set emitting back to true.
  • Loading branch information
bojidar-bg committed Aug 16, 2017
1 parent 19aff15 commit 995fca4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gles3/rasterizer_storage_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5177,6 +5177,10 @@ void RasterizerStorageGLES3::particles_set_emitting(RID p_particles, bool p_emit

Particles *particles = particles_owner.getornull(p_particles);
ERR_FAIL_COND(!particles);
if (p_emitting != particles->emitting) {
// Restart is overriden by set_emitting
particles->restart_request = false;
}
particles->emitting = p_emitting;
}
void RasterizerStorageGLES3::particles_set_amount(RID p_particles, int p_amount) {
Expand Down

0 comments on commit 995fca4

Please sign in to comment.