From 829c84e69f596281d2817ee1cf07d38b1b1fcf84 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 17 Feb 2009 15:47:53 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=3167 * Clamps textured map rgb values to 0-255 * Thanks DoranZemlja --- .../Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs index 69d3dac..8f61af7 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs @@ -89,6 +89,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap int ti = (int)(v * (1f - (1f - f) * s) * 255f); int vi = (int)(v * 255f); + if (pi < 0) pi = 0; + if (pi > 255) pi = 255; + if (qi < 0) qi = 0; + if (qi > 255) qi = 255; + if (ti < 0) ti = 0; + if (ti > 255) ti = 255; + if (vi < 0) vi = 0; + if (vi > 255) vi = 255; + switch (sector) { case 0: -- cgit v1.1