浏览代码

fix stack overflow

ncannasse 8 年之前
父节点
当前提交
faf2631c38
共有 1 个文件被更改,包括 3 次插入0 次删除
  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;