Merge branch 'master' into careminster

This commit is contained in:
Melanie
2012-02-24 09:56:06 +00:00
17 changed files with 122 additions and 53 deletions

View File

@@ -137,7 +137,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (cmdHandlerThread == null)
{
// Start the thread that will be doing the work
cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true);
cmdHandlerThread
= Watchdog.StartThread(
CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true);
}
}

View File

@@ -6834,16 +6834,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot)
{
m_host.AddScriptLPS(1);
// LSL quaternions can normalize to 0, normal Quaternions can't.
if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
rot.z = 1; // ZERO_ROTATION = 0,0,0,1
m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
m_host.SitTargetOrientation = Rot2Quaternion(rot);
m_host.ParentGroup.HasGroupChanged = true;
part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
part.SitTargetOrientation = Rot2Quaternion(rot);
part.ParentGroup.HasGroupChanged = true;
}
public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
{
m_host.AddScriptLPS(1);
SitTarget(m_host, offset, rot);
}
public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
{
m_host.AddScriptLPS(1);
if (link == ScriptBaseClass.LINK_ROOT)
SitTarget(m_host.ParentGroup.RootPart, offset, rot);
else if (link == ScriptBaseClass.LINK_THIS)
SitTarget(m_host, offset, rot);
else
{
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
if (null != part)
{
SitTarget(part, offset, rot);
}
}
}
public LSL_String llAvatarOnSitTarget()

View File

@@ -2779,7 +2779,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
m_host.AddScriptLPS(1);
ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
avatar.SpeedModifier = (float)SpeedModifier;
if (avatar != null)
avatar.SpeedModifier = (float)SpeedModifier;
}
public void osKickAvatar(string FirstName,string SurName,string alert)