summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorjitspoe <jitspoe@yahoo.com>2020-02-06 06:06:05 -0500
committerjitspoe <jitspoe@yahoo.com>2020-04-30 01:41:46 -0400
commit895ed2aed7baf1a6e32da39f7e2561973f500344 (patch)
tree507f9c496b56e93d51a14e209b9e685521541a91 /scene
parentdfed5efea3b5646cfca6662e52cf20c54558eb42 (diff)
Fix custom w component being uninitialized on CPU particles.
(cherry picked from commit 38085f2f6982c491935a434bb45e358dbebe1714) (cherry picked from commit b9c280b73ff6a13ea490d2da0f2728bcef3038dc)
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/cpu_particles_3d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index 2226b0ed83..2758c0deed 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -69,6 +69,7 @@ void CPUParticles3D::set_amount(int p_amount) {
for (int i = 0; i < p_amount; i++) {
w[i].active = false;
+ w[i].custom[3] = 0.0; // Make sure w component isn't garbage data
}
}