aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2013-06-06 00:37:06 +0100
committerUbitUmarov2013-06-06 00:37:06 +0100
commitc5d967b946b021cff455fbd507b8858401a5eb1f (patch)
treef28bf14138dc830ec0515d5251f1bca0fb6c3f47
parentMerge branch 'avination-current' into ubitwork (diff)
parentUpdate HTTP server (diff)
downloadopensim-SC-c5d967b946b021cff455fbd507b8858401a5eb1f.zip
opensim-SC-c5d967b946b021cff455fbd507b8858401a5eb1f.tar.gz
opensim-SC-c5d967b946b021cff455fbd507b8858401a5eb1f.tar.bz2
opensim-SC-c5d967b946b021cff455fbd507b8858401a5eb1f.tar.xz
Merge branch 'avination-current' into ubitwork
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs52
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
-rwxr-xr-xbin/HttpServer_OpenSim.dllbin119808 -> 116224 bytes
4 files changed, 43 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 584ffea..2b58795 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2440,6 +2440,14 @@ namespace OpenSim.Region.Framework.Scenes
2440 else 2440 else
2441 group.StopScriptInstances(); 2441 group.StopScriptInstances();
2442 2442
2443 List<UUID> avatars = group.GetSittingAvatars();
2444 foreach (UUID av in avatars)
2445 {
2446 ScenePresence p = GetScenePresence(av);
2447 if (p != null)
2448 p.StandUp();
2449 }
2450
2443 SceneObjectPart[] partList = group.Parts; 2451 SceneObjectPart[] partList = group.Parts;
2444 2452
2445 foreach (SceneObjectPart part in partList) 2453 foreach (SceneObjectPart part in partList)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6bcb361..5ea14c7 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 }
@@ -4668,24 +4679,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4668 m_host.AddScriptLPS(1); 4679 m_host.AddScriptLPS(1);
4669 UUID agentId = new UUID(); 4680 UUID agentId = new UUID();
4670 4681
4671 ulong regionHandle = Utils.UIntsToLong((uint)global_coords.x, (uint)global_coords.y); 4682 ulong regionHandle = Utils.UIntsToLong((uint)(global_coords.x / 256) * 256, (uint)(global_coords.y / 256) * 256);
4672 4683
4673 if (UUID.TryParse(agent, out agentId)) 4684 if (UUID.TryParse(agent, out agentId))
4674 { 4685 {
4686 // This function is owner only!
4687 if (m_host.OwnerID != agentId)
4688 return;
4689
4675 ScenePresence presence = World.GetScenePresence(agentId); 4690 ScenePresence presence = World.GetScenePresence(agentId);
4691
4692 // Can't TP sitting avatars
4693 if (presence.ParentID != 0) // Sitting
4694 return;
4695
4676 if (presence != null && presence.PresenceType != PresenceType.Npc) 4696 if (presence != null && presence.PresenceType != PresenceType.Npc)
4677 { 4697 {
4678 // agent must not be a god 4698 if (m_item.PermsGranter == agentId)
4679 if (presence.GodLevel >= 200) return;
4680
4681 // agent must be over the owners land
4682 if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID)
4683 {
4684 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation);
4685 }
4686 else // or must be wearing the prim
4687 { 4699 {
4688 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID) 4700 // If attached using llAttachToAvatarTemp, cowardly refuse
4701 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.ParentGroup.FromItemID == UUID.Zero)
4702 return;
4703
4704 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0)
4689 { 4705 {
4690 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); 4706 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation);
4691 } 4707 }
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;
diff --git a/bin/HttpServer_OpenSim.dll b/bin/HttpServer_OpenSim.dll
index e15493d..38a4cb7 100755
--- a/bin/HttpServer_OpenSim.dll
+++ b/bin/HttpServer_OpenSim.dll
Binary files differ