aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-03-02 22:20:02 +0100
committerMelanie2012-03-02 22:20:02 +0100
commitbfcba0a417f876a09eae7612f08919304f7513e3 (patch)
tree9801626bfd6ad58d7c78688e9457120eeba7866f /OpenSim
parentThis still causes terrain artefacts (diff)
downloadopensim-SC-bfcba0a417f876a09eae7612f08919304f7513e3.zip
opensim-SC-bfcba0a417f876a09eae7612f08919304f7513e3.tar.gz
opensim-SC-bfcba0a417f876a09eae7612f08919304f7513e3.tar.bz2
opensim-SC-bfcba0a417f876a09eae7612f08919304f7513e3.tar.xz
This still causes terrain artefacts
Revert " fix my bug on ChODE terrain heightmap build" This reverts commit aa77d1d486f11da7dc841190f1ca85e085d0d648.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
index ccdd32e..7a1e671 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
@@ -3457,8 +3457,8 @@ namespace OpenSim.Region.Physics.OdePlugin
3457 int heightmapWidth = regionsize + 2; // ODE map size 257 x 257 (Meters) (1 extra 3457 int heightmapWidth = regionsize + 2; // ODE map size 257 x 257 (Meters) (1 extra
3458 int heightmapHeight = regionsize + 2; 3458 int heightmapHeight = regionsize + 2;
3459 3459
3460 int heightmapWidthSamples = (int)regionsize + 3; // Sample file size, 258 x 258 samples 3460 int heightmapWidthSamples = (int)regionsize + 2; // Sample file size, 258 x 258 samples
3461 int heightmapHeightSamples = (int)regionsize + 3; 3461 int heightmapHeightSamples = (int)regionsize + 2;
3462 3462
3463 // Array of height samples for ODE 3463 // Array of height samples for ODE
3464 float[] _heightmap; 3464 float[] _heightmap;
@@ -3495,7 +3495,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3495 // Output x = 0 1 2 3 ..... 255 256 257 258 total out 3495 // Output x = 0 1 2 3 ..... 255 256 257 258 total out
3496 float val= heightMap[(yy * regionsize) + xx]; // input from heightMap, <0-255 * 256> <0-255> 3496 float val= heightMap[(yy * regionsize) + xx]; // input from heightMap, <0-255 * 256> <0-255>
3497 if (val < minele) val = minele; 3497 if (val < minele) val = minele;
3498 _heightmap[x * (heightmapWidthSamples) + y] = val; // samples output to _heightmap, <0-257 * 258> <0-257> 3498 _heightmap[x * (regionsize + 2) + y] = val; // samples output to _heightmap, <0-257 * 258> <0-257>
3499 hfmin = (val < hfmin) ? val : hfmin; 3499 hfmin = (val < hfmin) ? val : hfmin;
3500 hfmax = (val > hfmax) ? val : hfmax; 3500 hfmax = (val > hfmax) ? val : hfmax;
3501 } 3501 }