diff options
author | Teravus Ovares | 2008-04-10 15:27:02 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-10 15:27:02 +0000 |
commit | f2d36186f0686e5eb1c78cb7ace85d3e190ed093 (patch) | |
tree | f37d98757801a5ccf379280957965be65daebd3f | |
parent | * Minor inventory message cleanup and documentation (diff) | |
download | opensim-SC-f2d36186f0686e5eb1c78cb7ace85d3e190ed093.zip opensim-SC-f2d36186f0686e5eb1c78cb7ace85d3e190ed093.tar.gz opensim-SC-f2d36186f0686e5eb1c78cb7ace85d3e190ed093.tar.bz2 opensim-SC-f2d36186f0686e5eb1c78cb7ace85d3e190ed093.tar.xz |
* Slightly smoother transition between land, shallow water and deep water in map tile generation.
-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 | //} |