add check in lod control for camera existence when it can be empty in the sdk

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10591 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
bre..om 12 years ago
parent f553d6a39a
commit 7c966572f1
  1. 2
      engine/src/terrain/com/jme3/terrain/geomipmap/lodcalc/DistanceLodCalculator.java

@ -63,6 +63,8 @@ public class DistanceLodCalculator implements LodCalculator {
}
public boolean calculateLod(TerrainPatch terrainPatch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) {
if (locations == null || locations.isEmpty())
return false;// no camera yet
float distance = getCenterLocation(terrainPatch).distance(locations.get(0));
if (turnOffLod) {

Loading…
Cancel
Save