瀏覽代碼

bugfix in clone()

Nicolas Cannasse 11 年之前
父節點
當前提交
c53a52ba33
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      h3d/mat/Material.hx

+ 1 - 5
h3d/mat/Material.hx

@@ -74,11 +74,7 @@ class Material {
 		#if debug
 		if( Type.getClass(m) != Type.getClass(this) ) throw this + " is missing clone()";
 		#end
-		var p = passes;
-		while( p != null ) {
-			m.addPass(p.clone());
-			p = p.nextPass;
-		}
+		// DO NOT clone passes (it's up to the superclass to recreate the shaders)
 		m.castShadows = castShadows;
 		m.receiveShadows = receiveShadows;
 		return m;