From 8e45937974287fcba1aeb2c0dfb7c77d6b7d9171 Mon Sep 17 00:00:00 2001 From: Yan <115050813@qq.com> Date: Mon, 15 May 2017 11:06:35 +0800 Subject: [PATCH] Fix issue #654 Fix issue #654 --- .../src/main/java/com/jme3/water/WaterFilter.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java b/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java index c038c6ebe..c880c24e7 100644 --- a/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java +++ b/jme3-effects/src/main/java/com/jme3/water/WaterFilter.java @@ -332,6 +332,11 @@ public class WaterFilter extends Filter { oc.write(causticsIntensity, "causticsIntensity", 0.5f); oc.write(useCaustics, "useCaustics", true); + + //positional attributes + oc.write(center, "center", null); + oc.write(radius, "radius", 0f); + oc.write(shapeType.ordinal(), "shapeType", AreaShape.Circular.ordinal()); } @Override @@ -377,6 +382,11 @@ public class WaterFilter extends Filter { useCaustics = ic.readBoolean("useCaustics", true); + //positional attributes + center = (Vector3f) ic.readSavable("center", null); + radius = ic.readFloat("radius", 0f); + int shapeType = ic.readInt("shapeType", AreaShape.Circular.ordinal()); + this.shapeType = AreaShape.values()[shapeType]; } /**