From cac022d9bf4626024d617571a429023614d86ed4 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 22 Oct 2011 03:01:09 +0000 Subject: [PATCH] - re-enable clearing of wheels as its not done in btRaycastVehicle destructor (though one can not remove wheels oO) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8494 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java b/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java index cab8cd559..804d779d6 100644 --- a/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java +++ b/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java @@ -420,7 +420,9 @@ public class VehicleWheel implements Savable { protected void finalize() throws Throwable { super.finalize(); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Finalizing Wheel {0}", Long.toHexString(wheelId)); -// finalizeNative(wheelId); + if (wheelId != 0 && wheelIndex != 0) { + finalizeNative(wheelId, wheelIndex); + } } private native void finalizeNative(long wheelId, int wheelIndex);