aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs25
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a8b04c3..6fd2544 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2660,13 +2660,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2660 public void llSetHoverHeight(double height, int water, double tau) 2660 public void llSetHoverHeight(double height, int water, double tau)
2661 { 2661 {
2662 m_host.AddScriptLPS(1); 2662 m_host.AddScriptLPS(1);
2663 NotImplemented("llSetHoverHeight"); 2663 Vector3 pos = m_host.GetWorldPosition();
2664 int x = (int)(pos.X);
2665 int y = (int)(pos.Y);
2666 float landHeight = (float)World.GetLandHeight(x, y);
2667 float targetHeight = landHeight + (float)height;
2668 if (water == 1)
2669 {
2670 float waterHeight = (float)World.RegionInfo.RegionSettings.WaterHeight;
2671 if (waterHeight > targetHeight)
2672 {
2673 targetHeight = waterHeight + (float)height;
2674 }
2675 }
2676 if (m_host.PhysActor != null)
2677 {
2678 m_host.MoveToTarget(new Vector3(pos.X, pos.Y, targetHeight), (float)tau);
2679 m_host.PhysActor.Flying = true;
2680 }
2664 } 2681 }
2665 2682
2666 public void llStopHover() 2683 public void llStopHover()
2667 { 2684 {
2668 m_host.AddScriptLPS(1); 2685 m_host.AddScriptLPS(1);
2669 NotImplemented("llStopHover"); 2686 if (m_host.PhysActor != null)
2687 {
2688 m_host.PhysActor.Flying = false;
2689 m_host.PhysActor.PIDActive = false;
2690 }
2670 } 2691 }
2671 2692
2672 public void llMinEventDelay(double delay) 2693 public void llMinEventDelay(double delay)