From 7df0b41585a107014c288d8724b1653c0c88426a Mon Sep 17 00:00:00 2001 From: sploreg Date: Wed, 2 Apr 2014 14:49:29 -0700 Subject: [PATCH] TerrainLodControl no longer caches camera positions. Issue #121 --- .../com/jme3/terrain/geomipmap/TerrainLodControl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java index 96bedc21f..f52eaee01 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java +++ b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java @@ -160,11 +160,10 @@ public class TerrainLodControl extends AbstractControl { } if (cameras != null) { - if (cameraLocations.isEmpty() && !cameras.isEmpty()) { - for (Camera c : cameras) // populate them - { - cameraLocations.add(c.getLocation()); - } + cameraLocations.clear(); + for (Camera c : cameras) // populate them + { + cameraLocations.add(c.getLocation()); } updateLOD(cameraLocations, lodCalculator); }