aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs30
1 files changed, 13 insertions, 17 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 1d4a28e..c1c4d11 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -3482,24 +3482,21 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
3482 float hfmin = 2000; 3482 float hfmin = 2000;
3483 float hfmax = -2000; 3483 float hfmax = -2000;
3484 3484
3485 for (int x = 0; x < heightmapWidthSamples; x++) 3485 for (int x = 0; x < heightmapWidthSamples; x++)
3486 {
3487 for (int y = 0; y < heightmapHeightSamples; y++)
3486 { 3488 {
3487 for (int y = 0; y < heightmapHeightSamples; y++) 3489 int xx = Util.Clip(x - 1, 0, regionsize - 1);
3488 { 3490 int yy = Util.Clip(y - 1, 0, regionsize - 1);
3489 int xx = Util.Clip(x - 1, 0, regionsize - 1); 3491
3490 int yy = Util.Clip(y - 1, 0, regionsize - 1); 3492
3491 3493 float val= heightMap[yy * (int)Constants.RegionSize + xx];
3492 3494 _heightmap[x * ((int)Constants.RegionSize + 2) + y] = val;
3493 float val= heightMap[yy * (int)Constants.RegionSize + xx]; 3495
3494 _heightmap[x * ((int)Constants.RegionSize + 2) + y] = val; 3496 hfmin = (val < hfmin) ? val : hfmin;
3495 3497 hfmax = (val > hfmax) ? val : hfmax;
3496 hfmin = (val < hfmin) ? val : hfmin;
3497 hfmax = (val > hfmax) ? val : hfmax;
3498 }
3499 } 3498 }
3500 3499 }
3501
3502
3503 3500
3504 lock (OdeLock) 3501 lock (OdeLock)
3505 { 3502 {
@@ -3554,7 +3551,6 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
3554 } 3551 }
3555 RegionTerrain.Add(pOffset, GroundGeom, GroundGeom); 3552 RegionTerrain.Add(pOffset, GroundGeom, GroundGeom);
3556 TerrainHeightFieldHeights.Add(GroundGeom,_heightmap); 3553 TerrainHeightFieldHeights.Add(GroundGeom,_heightmap);
3557
3558 } 3554 }
3559 } 3555 }
3560 3556