From 5e1d8925fa8c037187eb65c2ff9a49d1e4000284 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 11 Apr 2008 17:24:04 +0000 Subject: * Fix bug 934 --- OpenSim/Region/Environment/Scenes/Scene.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 20cdb46..f15ec43 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1072,7 +1072,13 @@ namespace OpenSim.Region.Environment.Scenes heightvalue = 0; heightvalue = 100 - (heightvalue * 100) / 19; - + + if (heightvalue > 255) + heightvalue = 255; + + if (heightvalue < 0) + heightvalue = 0; + Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255); mapbmp.SetPixel(x, (256 - y) - 1, water); } -- cgit v1.1