Ensure CPU particles do not process if not visible

This commit is contained in:
Juan Linietsky 2018-10-08 00:55:15 -03:00
parent 14494dddd0
commit 328679fddd
2 changed files with 2 additions and 2 deletions

View File

@ -985,7 +985,7 @@ void CPUParticles2D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
if (particles.size() == 0)
if (particles.size() == 0 || !is_visible_in_tree())
return;
float delta = get_process_delta_time();

View File

@ -1036,7 +1036,7 @@ void CPUParticles::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
if (particles.size() == 0)
if (particles.size() == 0 || !is_visible_in_tree())
return;
float delta = get_process_delta_time();