diff options
author | Melanie | 2012-03-29 14:45:56 +0200 |
---|---|---|
committer | Melanie | 2012-03-29 14:45:56 +0200 |
commit | 807bb85ac28af3ee6352bdf27db3aaeaf016265e (patch) | |
tree | cad99b870319e6626828237e260002b57c69bbd3 /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-807bb85ac28af3ee6352bdf27db3aaeaf016265e.zip opensim-SC_OLD-807bb85ac28af3ee6352bdf27db3aaeaf016265e.tar.gz opensim-SC_OLD-807bb85ac28af3ee6352bdf27db3aaeaf016265e.tar.bz2 opensim-SC_OLD-807bb85ac28af3ee6352bdf27db3aaeaf016265e.tar.xz |
Allow llTeleportAgent to work in attachments
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4d7c40e..1a21e1c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4680,12 +4680,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4680 | // agent must not be a god | 4680 | // agent must not be a god |
4681 | if (presence.GodLevel >= 200) return; | 4681 | if (presence.GodLevel >= 200) return; |
4682 | 4682 | ||
4683 | if (simname == String.Empty) | ||
4684 | simname = World.RegionInfo.RegionName; | ||
4685 | |||
4683 | // agent must be over the owners land | 4686 | // agent must be over the owners land |
4684 | if (m_host.OwnerID == World.LandChannel.GetLandObject( | 4687 | if (m_host.OwnerID == World.LandChannel.GetLandObject( |
4685 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 4688 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
4686 | { | 4689 | { |
4687 | World.RequestTeleportLocation(presence.ControllingClient, simname, new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z), (uint)TeleportFlags.ViaLocation); | 4690 | World.RequestTeleportLocation(presence.ControllingClient, simname, new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z), (uint)TeleportFlags.ViaLocation); |
4688 | } | 4691 | } |
4692 | else // or must be wearing the prim | ||
4693 | { | ||
4694 | if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID) | ||
4695 | { | ||
4696 | World.RequestTeleportLocation(presence.ControllingClient, simname, new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z), (uint)TeleportFlags.ViaLocation); | ||
4697 | } | ||
4698 | } | ||
4689 | } | 4699 | } |
4690 | } | 4700 | } |
4691 | } | 4701 | } |