From f533e5003da348d1843858b611f9aae7b1470494 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Tue, 13 Feb 2018 19:22:48 -0800 Subject: [PATCH] address issue #825: SpatialTrack.clone() sets the trackSpatial to null --- .../src/main/java/com/jme3/animation/SpatialTrack.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/animation/SpatialTrack.java b/jme3-core/src/main/java/com/jme3/animation/SpatialTrack.java index c770838f0..415606326 100644 --- a/jme3-core/src/main/java/com/jme3/animation/SpatialTrack.java +++ b/jme3-core/src/main/java/com/jme3/animation/SpatialTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2018 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -252,7 +252,9 @@ public class SpatialTrack implements Track, JmeCloneable { @Override public Track clone() { - return (Track) jmeClone(); + SpatialTrack copy = (SpatialTrack) jmeClone(); + copy.setTrackSpatial(trackSpatial); + return (Track) copy; } @Override