aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs5
2 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 094b0f5..9111d28 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -994,7 +994,7 @@ namespace OpenSim.Region.CoreModules.World.Land
994 } 994 }
995 else 995 else
996 { 996 {
997 // keeping previus odd average 997 // keeping previous odd average
998 avgx = (avgx * tempArea + x) / (tempArea + 1); 998 avgx = (avgx * tempArea + x) / (tempArea + 1);
999 avgy = (avgy * tempArea + y) / (tempArea + 1); 999 avgy = (avgy * tempArea + y) / (tempArea + 1);
1000 } 1000 }
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
index 4b9f207..f60beaf 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
@@ -441,6 +441,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
441 startHeights[0], startHeights[2], 441 startHeights[0], startHeights[2],
442 startHeights[1], startHeights[3], 442 startHeights[1], startHeights[3],
443 pctX, pctY); 443 pctX, pctY);
444 if (float.IsNaN(startHeight))
445 return 0;
446
444 startHeight = Utils.Clamp(startHeight, 0f, 255f); 447 startHeight = Utils.Clamp(startHeight, 0f, 255f);
445 448
446 float heightRange = ImageUtils.Bilinear( 449 float heightRange = ImageUtils.Bilinear(
@@ -448,7 +451,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
448 heightRanges[1], heightRanges[3], 451 heightRanges[1], heightRanges[3],
449 pctX, pctY); 452 pctX, pctY);
450 heightRange = Utils.Clamp(heightRange, 0f, 255f); 453 heightRange = Utils.Clamp(heightRange, 0f, 255f);
451 if(heightRange == 0f) 454 if(heightRange == 0f || float.IsNaN(heightRange))
452 return 0; 455 return 0;
453 456
454 // Generate two frequencies of perlin noise based on our global position 457 // Generate two frequencies of perlin noise based on our global position