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.
0.6.0-stable
Charles Krinke 2008-10-30 14:06:00 +00:00
parent 09d44612aa
commit 87e7ff5932
1 changed files with 23 additions and 2 deletions

View File

@ -2660,13 +2660,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetHoverHeight(double height, int water, double tau)
{
m_host.AddScriptLPS(1);
NotImplemented("llSetHoverHeight");
Vector3 pos = m_host.GetWorldPosition();
int x = (int)(pos.X);
int y = (int)(pos.Y);
float landHeight = (float)World.GetLandHeight(x, y);
float targetHeight = landHeight + (float)height;
if (water == 1)
{
float waterHeight = (float)World.RegionInfo.RegionSettings.WaterHeight;
if (waterHeight > targetHeight)
{
targetHeight = waterHeight + (float)height;
}
}
if (m_host.PhysActor != null)
{
m_host.MoveToTarget(new Vector3(pos.X, pos.Y, targetHeight), (float)tau);
m_host.PhysActor.Flying = true;
}
}
public void llStopHover()
{
m_host.AddScriptLPS(1);
NotImplemented("llStopHover");
if (m_host.PhysActor != null)
{
m_host.PhysActor.Flying = false;
m_host.PhysActor.PIDActive = false;
}
}
public void llMinEventDelay(double delay)