diff options
author | UbitUmarov | 2019-07-30 17:51:20 +0100 |
---|---|---|
committer | UbitUmarov | 2019-07-30 17:51:20 +0100 |
commit | 87eb2fa9da4c59fa897b9959cca323f63a32825a (patch) | |
tree | 5bec3745348e11c1946beb5f9b010156405ae137 /OpenSim/Region | |
parent | Don't try to print XML if a corrupted asset is actually binary data (diff) | |
download | opensim-SC-87eb2fa9da4c59fa897b9959cca323f63a32825a.zip opensim-SC-87eb2fa9da4c59fa897b9959cca323f63a32825a.tar.gz opensim-SC-87eb2fa9da4c59fa897b9959cca323f63a32825a.tar.bz2 opensim-SC-87eb2fa9da4c59fa897b9959cca323f63a32825a.tar.xz |
cosmetics
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs | 5 |
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 |