aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs43
1 files changed, 41 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index d665f69..1a88529 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -876,7 +876,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
876 if(landdata.OwnerID == hostOwner) 876 if(landdata.OwnerID == hostOwner)
877 return true; 877 return true;
878 878
879 if(World.RegionInfo.EstateSettings != null && World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(hostOwner)) 879 EstateSettings es = World.RegionInfo.EstateSettings;
880 if(es != null && es.IsEstateManagerOrOwner(hostOwner))
880 return true; 881 return true;
881 882
882 if(!landdata.IsGroupOwned) 883 if(!landdata.IsGroupOwned)
@@ -4756,6 +4757,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4756 sog.SetInertiaData(-1, Vector3.Zero, Vector3.Zero, Vector4.Zero ); 4757 sog.SetInertiaData(-1, Vector3.Zero, Vector3.Zero, Vector4.Zero );
4757 } 4758 }
4758 4759
4760 private bool checkAllowObjectTPbyLandOwner(Vector3 pos)
4761 {
4762 ILandObject land = World.LandChannel.GetLandObject(pos);
4763 if(land == null)
4764 return true;
4765
4766 LandData landdata = land.LandData;
4767 if(landdata == null)
4768 return true;
4769
4770 UUID hostOwner = m_host.OwnerID;
4771 if(landdata.OwnerID == hostOwner)
4772 return true;
4773
4774 EstateSettings es = World.RegionInfo.EstateSettings;
4775 if(es != null && es.IsEstateManagerOrOwner(hostOwner))
4776 return true;
4777
4778 if(!landdata.IsGroupOwned)
4779 return false;
4780
4781 UUID landGroup = landdata.GroupID;
4782 if(landGroup == UUID.Zero)
4783 return false;
4784
4785 if(landGroup == m_host.GroupID)
4786 return true;
4787
4788 return false;
4789 }
4790
4759 /// <summary> 4791 /// <summary>
4760 /// teleports a object (full linkset) 4792 /// teleports a object (full linkset)
4761 /// </summary> 4793 /// </summary>
@@ -4785,9 +4817,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4785 } 4817 }
4786 4818
4787 SceneObjectGroup sog = World.GetSceneObjectGroup(objUUID); 4819 SceneObjectGroup sog = World.GetSceneObjectGroup(objUUID);
4788 if(sog== null || sog.IsDeleted) 4820 if(sog== null || sog.IsDeleted || sog.inTransit)
4789 return -1; 4821 return -1;
4790 4822
4823 if(sog.OwnerID != m_host.OwnerID)
4824 {
4825 Vector3 pos = sog.AbsolutePosition;
4826 if(!checkAllowObjectTPbyLandOwner(pos))
4827 return -1;
4828 }
4829
4791 UUID myid = m_host.ParentGroup.UUID; 4830 UUID myid = m_host.ParentGroup.UUID;
4792 4831
4793 return sog.TeleportObject(myid, targetPos, rotation, flags); 4832 return sog.TeleportObject(myid, targetPos, rotation, flags);