Parcourir la source

fix stack overflow

ncannasse il y a 8 ans
Parent
commit
faf2631c38
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      h3d/parts/GpuParticles.hx

+ 3 - 0
h3d/parts/GpuParticles.hx

@@ -572,7 +572,10 @@ class GpuParticles extends h3d.scene.MultiMaterial {
 				calcEmit = g.emitMode;
 				switch( g.emitMode ) {
 				case ParentBounds:
+					var ignore = flags.has(FIgnoreBounds);
+					flags.set(FIgnoreBounds, true);
 					ebounds = parent.getBounds();
+					flags.set(FIgnoreBounds, ignore);
 					ebounds.transform(getInvPos());
 				case VolumeBounds, CameraBounds:
 					ebounds = volumeBounds;