浏览代码

FX: fix loading of shader anims

trethaller 7 年之前
父节点
当前提交
deaa0a5ae4
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      hide/prefab/fx/FXScene.hx

+ 5 - 4
hide/prefab/fx/FXScene.hx

@@ -233,11 +233,12 @@ class FXScene extends Library {
 		if( inRec )
 		if( inRec )
 			return ctx;
 			return ctx;
 		ctx = ctx.clone(this);
 		ctx = ctx.clone(this);
-		var anim = new FXAnimation(ctx.local3d);
-		getObjAnimations(ctx, this, anim.objects);
-		getShaderAnims(ctx, this, anim.shaderAnims);
-		ctx.local3d = anim;
 		super.makeInstance(ctx);
 		super.makeInstance(ctx);
+		var fxanim = new FXAnimation(ctx.local3d);
+		var ctx = super.makeInstance(ctx);
+		getObjAnimations(ctx, this, fxanim.objects);
+		getShaderAnims(ctx, this, fxanim.shaderAnims);
+		ctx.local3d = fxanim;
 		return ctx; 
 		return ctx; 
 	}
 	}