aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
1 files changed, 11 insertions, 1 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..ce05b8c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4214,7 +4214,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4214 World.ForEachRootScenePresence(delegate(ScenePresence presence) 4214 World.ForEachRootScenePresence(delegate(ScenePresence presence)
4215 { 4215 {
4216 SceneObjectPart sitPart = presence.ParentPart; 4216 SceneObjectPart sitPart = presence.ParentPart;
4217 if (sitPart != null && m_host.ParentGroup.HasChildPrim(sitPart.LocalId)) 4217 if (sitPart != null && m_host.ParentGroup.ContainsPart(sitPart.LocalId))
4218 nametable.Add(presence.ControllingClient.Name); 4218 nametable.Add(presence.ControllingClient.Name);
4219 }); 4219 });
4220 4220
@@ -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 }