aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorCharles Krinke2008-10-30 14:06:00 +0000
committerCharles Krinke2008-10-30 14:06:00 +0000
commit87e7ff59327ddc9d5ecb3cd36a972e497541ceda (patch)
tree4a7be5b307c84d1633884aa0aec68a8216258c34 /OpenSim/Region/ScriptEngine/Shared
parentfix nant file break (diff)
downloadopensim-SC_OLD-87e7ff59327ddc9d5ecb3cd36a972e497541ceda.zip
opensim-SC_OLD-87e7ff59327ddc9d5ecb3cd36a972e497541ceda.tar.gz
opensim-SC_OLD-87e7ff59327ddc9d5ecb3cd36a972e497541ceda.tar.bz2
opensim-SC_OLD-87e7ff59327ddc9d5ecb3cd36a972e497541ceda.tar.xz
Thank you kindly, NLin for an implementation patch
for llSetHoverHeight() and llStopHover(). I believe this gets is to less then 50 LSL functions left to implement.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-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)