From 736fb0b41dae9ab4a66e556bbb37aeb9d6360f1d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 19 Feb 2012 02:07:43 +0000 Subject: minor fix to chODE terrain heighmap scale --- OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs index 03059f7..b5b30ee 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs @@ -3440,15 +3440,15 @@ namespace OpenSim.Region.Physics.OdePlugin int regionsize = (int) Constants.RegionSize; // visible region size eg. 256(M) - int heightmapWidth = regionsize + 2; // ODE map size 257 x 257 (Meters) (1 extra + int heightmapWidth = regionsize + 2; // ODE map size 258 x 258 (Meters) (1 extra each side) int heightmapHeight = regionsize + 2; - int heightmapWidthSamples = (int)regionsize + 2; // Sample file size, 258 x 258 samples - int heightmapHeightSamples = (int)regionsize + 2; + int heightmapWidthSamples = (int)regionsize + 3; // to have 258m we need 259 samples + int heightmapHeightSamples = (int)regionsize + 3; // Array of height samples for ODE float[] _heightmap; - _heightmap = new float[(heightmapWidthSamples * heightmapHeightSamples)]; // loaded samples 258 x 258 + _heightmap = new float[(heightmapWidthSamples * heightmapHeightSamples)]; // loaded samples 259 x 259 // Other ODE parameters const float scale = 1.0f; -- cgit v1.1