diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index eb5fe56..6816ad6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -996,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
996 | 996 | ||
997 | float heightvalue = 0; | 997 | float heightvalue = 0; |
998 | 998 | ||
999 | Color water = Color.FromArgb(0, 0, 255); | 999 | |
1000 | Color prim = Color.FromArgb(120, 120, 120); | 1000 | Color prim = Color.FromArgb(120, 120, 120); |
1001 | LLVector3 RayEnd = new LLVector3(0, 0, 0); | 1001 | LLVector3 RayEnd = new LLVector3(0, 0, 0); |
1002 | LLVector3 RayStart = new LLVector3(0, 0, 0); | 1002 | LLVector3 RayStart = new LLVector3(0, 0, 0); |
@@ -1042,7 +1042,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1042 | //} | 1042 | //} |
1043 | //else | 1043 | //else |
1044 | //{ | 1044 | //{ |
1045 | //float tmpval = (float)hm[x, y]; | 1045 | float tmpval = (float)hm[x, y]; |
1046 | heightvalue = (float)hm[x, y]; | 1046 | heightvalue = (float)hm[x, y]; |
1047 | 1047 | ||
1048 | if ((float)heightvalue > m_regInfo.EstateSettings.waterHeight) | 1048 | if ((float)heightvalue > m_regInfo.EstateSettings.waterHeight) |
@@ -1065,6 +1065,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
1065 | else | 1065 | else |
1066 | { | 1066 | { |
1067 | // Y flip the cordinates | 1067 | // Y flip the cordinates |
1068 | heightvalue = m_regInfo.EstateSettings.waterHeight - heightvalue; | ||
1069 | if (heightvalue > 19) | ||
1070 | heightvalue = 19; | ||
1071 | if (heightvalue < 0) | ||
1072 | heightvalue = 0; | ||
1073 | |||
1074 | heightvalue = 100 - (heightvalue * 100) / 19; | ||
1075 | |||
1076 | Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255); | ||
1068 | mapbmp.SetPixel(x, (256 - y) - 1, water); | 1077 | mapbmp.SetPixel(x, (256 - y) - 1, water); |
1069 | } | 1078 | } |
1070 | //} | 1079 | //} |