aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
1 files changed, 7 insertions, 1 deletions
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
1072 heightvalue = 0; 1072 heightvalue = 0;
1073 1073
1074 heightvalue = 100 - (heightvalue * 100) / 19; 1074 heightvalue = 100 - (heightvalue * 100) / 19;
1075 1075
1076 if (heightvalue > 255)
1077 heightvalue = 255;
1078
1079 if (heightvalue < 0)
1080 heightvalue = 0;
1081
1076 Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255); 1082 Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255);
1077 mapbmp.SetPixel(x, (256 - y) - 1, water); 1083 mapbmp.SetPixel(x, (256 - y) - 1, water);
1078 } 1084 }