Merge branch 'master' of /home/opensim/var/repo/opensim

This commit is contained in:
BlueWall
2012-04-26 16:13:47 -04:00
33 changed files with 512 additions and 389 deletions

View File

@@ -209,6 +209,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
throw new Exception("OSSL Runtime Error: " + msg);
}
/// <summary>
/// Initialize the LSL interface.
/// </summary>
/// <remarks>
/// FIXME: This is an abomination. We should be able to set this up earlier but currently we have no
/// guarantee the interface is present on Initialize(). There needs to be another post initialize call from
/// ScriptInstance.
/// </remarks>
private void InitLSL()
{
if (m_LSL_Api != null)
@@ -1609,7 +1617,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public Object osParseJSONNew(string JSON)
{
CheckThreatLevel(ThreatLevel.None, "osParseJSON");
CheckThreatLevel(ThreatLevel.None, "osParseJSONNew");
m_host.AddScriptLPS(1);
@@ -3132,5 +3140,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high);
}
}
public void osForceAttachToAvatar(int attachmentPoint)
{
CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatar");
m_host.AddScriptLPS(1);
InitLSL();
((LSL_Api)m_LSL_Api).AttachToAvatar(attachmentPoint);
}
public void osForceDetachFromAvatar()
{
CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar");
m_host.AddScriptLPS(1);
InitLSL();
((LSL_Api)m_LSL_Api).DetachFromAvatar();
}
}
}