diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-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 edfc0ef..ce05b8c 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 | } |