From 5b7a408bccd5e4b2c58a2e8986101fd9b7fd6586 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sat, 28 Jun 2014 19:09:20 -0400 Subject: [PATCH] * Fix issue where BatchNode.clone() would still re-use the previous BatchNode's data structures --- jme3-core/src/main/java/com/jme3/scene/BatchNode.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/scene/BatchNode.java b/jme3-core/src/main/java/com/jme3/scene/BatchNode.java index 8c12f3c32..f838d1fbc 100644 --- a/jme3-core/src/main/java/com/jme3/scene/BatchNode.java +++ b/jme3-core/src/main/java/com/jme3/scene/BatchNode.java @@ -773,10 +773,6 @@ public class BatchNode extends GeometryGroupNode implements Savable { this.needsFullRebatch = needsFullRebatch; } - public int getOffsetIndex(Geometry batchedGeometry) { - return batchedGeometry.startIndex; - } - @Override public Node clone(boolean cloneMaterials) { BatchNode clone = (BatchNode)super.clone(cloneMaterials); @@ -790,8 +786,8 @@ public class BatchNode extends GeometryGroupNode implements Savable { } } clone.needsFullRebatch = true; - clone.batches.clear(); - clone.batchesByGeom.clear(); + clone.batches = new SafeArrayList(Batch.class); + clone.batchesByGeom = new HashMap(); clone.batch(); } return clone;