From d92171b1537ab36543853f2b952791d03d8f50d9 Mon Sep 17 00:00:00 2001 From: Nehon Date: Wed, 18 Nov 2015 13:54:26 +0100 Subject: [PATCH] Fixed LightProbe Saving and Loading --- jme3-core/src/main/java/com/jme3/light/LightProbe.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/light/LightProbe.java b/jme3-core/src/main/java/com/jme3/light/LightProbe.java index e1e7a8e36..4abac3b4b 100644 --- a/jme3-core/src/main/java/com/jme3/light/LightProbe.java +++ b/jme3-core/src/main/java/com/jme3/light/LightProbe.java @@ -130,7 +130,8 @@ public class LightProbe extends Light implements Savable { oc.write(irradianceMap, "irradianceMap", null); oc.write(prefilteredEnvMap, "prefilteredEnvMap", null); oc.write(position, "position", null); - oc.write(bounds, "bounds", bounds); + oc.write(bounds, "bounds", new BoundingSphere(1.0f, Vector3f.ZERO)); + oc.write(ready, "ready", false); } @Override @@ -140,7 +141,8 @@ public class LightProbe extends Light implements Savable { irradianceMap = (TextureCubeMap) ic.readSavable("irradianceMap", null); prefilteredEnvMap = (TextureCubeMap) ic.readSavable("prefilteredEnvMap", null); position = (Vector3f) ic.readSavable("position", this); - bounds = (BoundingVolume) ic.readSavable("bounds", bounds); + bounds = (BoundingVolume) ic.readSavable("bounds", new BoundingSphere(1.0f, Vector3f.ZERO)); + ready = ic.readBoolean("ready", false); } /**