aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2013-06-02 16:28:28 +0200
committerMelanie2013-06-02 16:28:28 +0200
commitbd87eb90d10946bb4e010ed84d9a7577d8158a07 (patch)
tree4eb5693197aa9be0346037e30246a25d7f9c6209 /OpenSim/Region/ScriptEngine/Shared
parentFix multi-wear of alpha and tattoo layers. (diff)
downloadopensim-SC_OLD-bd87eb90d10946bb4e010ed84d9a7577d8158a07.zip
opensim-SC_OLD-bd87eb90d10946bb4e010ed84d9a7577d8158a07.tar.gz
opensim-SC_OLD-bd87eb90d10946bb4e010ed84d9a7577d8158a07.tar.bz2
opensim-SC_OLD-bd87eb90d10946bb4e010ed84d9a7577d8158a07.tar.xz
Implement PERMISSION_TELEPORT and the needed checks to make it work.
Old auth system still works as well.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs25
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
2 files changed, 19 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6bcb361..5af2a8d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4641,20 +4641,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4641 ScenePresence presence = World.GetScenePresence(agentId); 4641 ScenePresence presence = World.GetScenePresence(agentId);
4642 if (presence != null && presence.PresenceType != PresenceType.Npc) 4642 if (presence != null && presence.PresenceType != PresenceType.Npc)
4643 { 4643 {
4644 // agent must not be a god
4645 if (presence.GodLevel >= 200) return;
4646
4647 if (destination == String.Empty) 4644 if (destination == String.Empty)
4648 destination = World.RegionInfo.RegionName; 4645 destination = World.RegionInfo.RegionName;
4649 4646
4650 // agent must be over the owners land 4647 if (m_item.PermsGranter == agentId)
4651 if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) 4648 {
4649 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0)
4650 {
4651 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4652 }
4653 }
4654
4655 // agent must be wearing the object
4656 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID)
4652 { 4657 {
4653 DoLLTeleport(presence, destination, targetPos, targetLookAt); 4658 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4654 } 4659 }
4655 else // or must be wearing the prim 4660 else
4656 { 4661 {
4657 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID) 4662 // agent must not be a god
4663 if (presence.GodLevel >= 200) return;
4664
4665 // agent must be over the owners land
4666 ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition);
4667 ILandObject objectLand = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
4668 if (m_host.OwnerID == objectLand.LandData.OwnerID && m_host.OwnerID == agentLand.LandData.OwnerID)
4658 { 4669 {
4659 DoLLTeleport(presence, destination, targetPos, targetLookAt); 4670 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4660 } 4671 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index c664a84..6efa73f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -80,6 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
80 public const int PERMISSION_CHANGE_PERMISSIONS = 512; 80 public const int PERMISSION_CHANGE_PERMISSIONS = 512;
81 public const int PERMISSION_TRACK_CAMERA = 1024; 81 public const int PERMISSION_TRACK_CAMERA = 1024;
82 public const int PERMISSION_CONTROL_CAMERA = 2048; 82 public const int PERMISSION_CONTROL_CAMERA = 2048;
83 public const int PERMISSION_TELEPORT = 4096;
83 84
84 public const int AGENT_FLYING = 1; 85 public const int AGENT_FLYING = 1;
85 public const int AGENT_ATTACHMENTS = 2; 86 public const int AGENT_ATTACHMENTS = 2;