From 49d64f34239b187147cc781c5099f33ab974d8d6 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 16 Nov 2011 14:21:17 +0000 Subject: [PATCH] - fix FractalTileLoader using patchSize instead of quadSize git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8701 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/terrain/geomipmap/grid/FractalTileLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/terrain/com/jme3/terrain/geomipmap/grid/FractalTileLoader.java b/engine/src/terrain/com/jme3/terrain/geomipmap/grid/FractalTileLoader.java index 08ff50375..8b5c85aff 100644 --- a/engine/src/terrain/com/jme3/terrain/geomipmap/grid/FractalTileLoader.java +++ b/engine/src/terrain/com/jme3/terrain/geomipmap/grid/FractalTileLoader.java @@ -63,9 +63,9 @@ public class FractalTileLoader implements TerrainGridTileLoader{ heightmap.setHeightScale(heightScale); } catch (IOException e) {} } else { - FloatBuffer buffer = this.base.getBuffer(location.x * (this.patchSize - 1), location.z * (this.patchSize - 1), 0, this.patchSize); + FloatBuffer buffer = this.base.getBuffer(location.x * (this.quadSize - 1), location.z * (this.quadSize - 1), 0, this.quadSize); if (this.cacheDir != null) { - MapUtils.saveImage(MapUtils.toGrayscale16Image(buffer, this.patchSize), new File(this.cacheDir, "terrain_" + (int) location.x + MapUtils.saveImage(MapUtils.toGrayscale16Image(buffer, this.quadSize), new File(this.cacheDir, "terrain_" + (int) location.x + "_" + (int) location.z + ".png")); } float[] arr = buffer.array();