Merge branch 'master' of /var/git/opensim/
commit
e633b214cb
|
@ -639,6 +639,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
//
|
//
|
||||||
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
|
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
|
||||||
|
|
||||||
|
TeleportAgent(agent, regionName, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
||||||
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
UUID agentId = new UUID();
|
UUID agentId = new UUID();
|
||||||
if (UUID.TryParse(agent, out agentId))
|
if (UUID.TryParse(agent, out agentId))
|
||||||
|
@ -651,7 +656,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
== World.LandChannel.GetLandObject(
|
== World.LandChannel.GetLandObject(
|
||||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Check for hostname , attempt to make a hglink
|
// Check for hostname , attempt to make a hglink
|
||||||
// and convert the regionName to the target region
|
// and convert the regionName to the target region
|
||||||
if (regionName.Contains(".") && regionName.Contains(":"))
|
if (regionName.Contains(".") && regionName.Contains(":"))
|
||||||
|
@ -674,13 +678,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Teleport functions
|
|
||||||
public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
||||||
{
|
{
|
||||||
// High because there is no security check. High griefer potential
|
// High because there is no security check. High griefer potential
|
||||||
//
|
//
|
||||||
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
|
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
|
||||||
|
|
||||||
|
TeleportAgent(agent, regionX, regionY, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
||||||
|
{
|
||||||
ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
|
ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
@ -709,6 +717,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat);
|
osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
||||||
|
{
|
||||||
|
// Threat level None because this is what can already be done with the World Map in the viewer
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
|
||||||
|
|
||||||
|
TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
||||||
|
{
|
||||||
|
osTeleportOwner(World.RegionInfo.RegionName, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
|
||||||
|
|
||||||
|
TeleportAgent(m_host.OwnerID.ToString(), regionX, regionY, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
// Functions that get information from the agent itself.
|
// Functions that get information from the agent itself.
|
||||||
//
|
//
|
||||||
// osGetAgentIP - this is used to determine the IP address of
|
// osGetAgentIP - this is used to determine the IP address of
|
||||||
|
|
|
@ -86,6 +86,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||||
void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||||
void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||||
|
void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||||
|
void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||||
|
void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||||
|
|
||||||
// Animation commands
|
// Animation commands
|
||||||
void osAvatarPlayAnimation(string avatar, string animation);
|
void osAvatarPlayAnimation(string avatar, string animation);
|
||||||
|
|
|
@ -227,6 +227,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
|
m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osTeleportOwner(string regionName, vector position, vector lookat)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void osTeleportOwner(vector position, vector lookat)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osTeleportOwner(position, lookat);
|
||||||
|
}
|
||||||
|
|
||||||
// Avatar info functions
|
// Avatar info functions
|
||||||
public string osGetAgentIP(string agent)
|
public string osGetAgentIP(string agent)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue