- fix bug in cloneForSpatial use in Spatial

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10369 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 88be282190
commit 2addc81210
  1. 2
      engine/src/core/com/jme3/scene/Spatial.java

@ -1183,7 +1183,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
clone.controls = new SafeArrayList<Control>(Control.class); clone.controls = new SafeArrayList<Control>(Control.class);
for (int i = 0; i < controls.size(); i++) { for (int i = 0; i < controls.size(); i++) {
Control newControl = controls.get(i).cloneForSpatial(clone); Control newControl = controls.get(i).cloneForSpatial(clone);
newControl.setSpatial(this); newControl.setSpatial(clone);
clone.controls.add(newControl); clone.controls.add(newControl);
} }

Loading…
Cancel
Save