- fix Animation loading by using arraycopy..

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8375 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 5eaca4c132
commit c79968463d
  1. 4
      engine/src/core/com/jme3/animation/Animation.java

@ -199,6 +199,8 @@ public class Animation implements Savable, Cloneable {
InputCapsule in = im.getCapsule(this); InputCapsule in = im.getCapsule(this);
name = in.readString("name", null); name = in.readString("name", null);
length = in.readFloat("length", 0f); length = in.readFloat("length", 0f);
tracks = (Track<?>[]) in.readSavableArray("tracks", null); Object[] arr = in.readSavableArray("tracks", null);
tracks = new Track<?>[arr.length];
System.arraycopy(arr, 0, tracks, 0, arr.length);
} }
} }

Loading…
Cancel
Save