diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5be967e..fad456f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1007,17 +1007,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1007 | int y = (int)(pos.Y + offset.y); | 1007 | int y = (int)(pos.Y + offset.y); |
1008 | 1008 | ||
1009 | // Clamp to valid position | 1009 | // Clamp to valid position |
1010 | if (x<0) | 1010 | if (x < 0) |
1011 | x = 0; | 1011 | x = 0; |
1012 | else if (x>=World.Heightmap.Width) | 1012 | else if (x >= World.Heightmap.Width) |
1013 | x = World.Heightmap.Width-1; | 1013 | x = World.Heightmap.Width - 1; |
1014 | if (y<0) | 1014 | if (y < 0) |
1015 | y = 0; | 1015 | y = 0; |
1016 | else if (y>=World.Heightmap.Height) | 1016 | else if (y >= World.Heightmap.Height) |
1017 | y = World.Heightmap.Height-1; | 1017 | y = World.Heightmap.Height - 1; |
1018 | 1018 | ||
1019 | 1019 | return World.Heightmap[x, y]; | |
1020 | return World.GetLandHeight(x, y); | ||
1021 | } | 1020 | } |
1022 | 1021 | ||
1023 | public LSL_Float llCloud(LSL_Vector offset) | 1022 | public LSL_Float llCloud(LSL_Vector offset) |
@@ -2794,15 +2793,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2794 | } | 2793 | } |
2795 | } | 2794 | } |
2796 | 2795 | ||
2797 | |||
2798 | |||
2799 | public void llSetHoverHeight(double height, int water, double tau) | 2796 | public void llSetHoverHeight(double height, int water, double tau) |
2800 | { | 2797 | { |
2801 | m_host.AddScriptLPS(1); | 2798 | m_host.AddScriptLPS(1); |
2802 | Vector3 pos = m_host.GetWorldPosition(); | 2799 | Vector3 pos = m_host.GetWorldPosition(); |
2803 | int x = (int)(pos.X); | 2800 | int x = (int)(pos.X); |
2804 | int y = (int)(pos.Y); | 2801 | int y = (int)(pos.Y); |
2805 | float landHeight = (float)World.GetLandHeight(x, y); | 2802 | float landHeight = (float)World.Heightmap[x, y]; |
2806 | float targetHeight = landHeight + (float)height; | 2803 | float targetHeight = landHeight + (float)height; |
2807 | if (water == 1) | 2804 | if (water == 1) |
2808 | { | 2805 | { |