From 87eb2fa9da4c59fa897b9959cca323f63a32825a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 30 Jul 2019 17:51:20 +0100 Subject: cosmetics --- OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs | 2 -- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 +- OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs | 5 ++++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs index 099c7b4..a5f0056 100644 --- a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs @@ -138,8 +138,6 @@ namespace OpenSim.Capabilities.Handlers if(type == AssetType.Mesh || type == AssetType.Texture) responsedata["throttle"] = true; -// else -// m_log.Warn("[GETASSETS]: type: " + query); responsedata["content_type"] = asset.Metadata.ContentType; responsedata["bin_response_data"] = asset.Data; 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 } else { - // keeping previus odd average + // keeping previous odd average avgx = (avgx * tempArea + x) / (tempArea + 1); avgy = (avgy * tempArea + y) / (tempArea + 1); } 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 startHeights[0], startHeights[2], startHeights[1], startHeights[3], pctX, pctY); + if (float.IsNaN(startHeight)) + return 0; + startHeight = Utils.Clamp(startHeight, 0f, 255f); float heightRange = ImageUtils.Bilinear( @@ -448,7 +451,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap heightRanges[1], heightRanges[3], pctX, pctY); heightRange = Utils.Clamp(heightRange, 0f, 255f); - if(heightRange == 0f) + if(heightRange == 0f || float.IsNaN(heightRange)) return 0; // Generate two frequencies of perlin noise based on our global position -- cgit v1.1