aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMelanie2010-11-16 21:15:15 +0000
committerMelanie2010-11-16 21:15:15 +0000
commitc4eb430ad2c6f9bbd3f1734d883954f4d5b1b6fd (patch)
tree65fd5c2fc7e5b7e4cc4e48280d20e12ed84be320 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parentChange the way attachments are persisted. Editing a worn attachment will now (diff)
downloadopensim-SC_OLD-c4eb430ad2c6f9bbd3f1734d883954f4d5b1b6fd.zip
opensim-SC_OLD-c4eb430ad2c6f9bbd3f1734d883954f4d5b1b6fd.tar.gz
opensim-SC_OLD-c4eb430ad2c6f9bbd3f1734d883954f4d5b1b6fd.tar.bz2
opensim-SC_OLD-c4eb430ad2c6f9bbd3f1734d883954f4d5b1b6fd.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs38
2 files changed, 38 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c602307..254ed0f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10493,6 +10493,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10493 case "4": 10493 case "4":
10494 ret = ret + new LSL_List(land.Area); 10494 ret = ret + new LSL_List(land.Area);
10495 break; 10495 break;
10496 case "5":
10497 ret = ret + new LSL_List(land.GlobalID);
10498 break;
10496 default: 10499 default:
10497 ret = ret + new LSL_List(0); 10500 ret = ret + new LSL_List(0);
10498 break; 10501 break;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 5212e1b..7ce3716 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -648,6 +648,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
648 // 648 //
649 CheckThreatLevel(ThreatLevel.High, "osTeleportAgent"); 649 CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
650 650
651 TeleportAgent(agent, regionName, position, lookat);
652 }
653
654 private void TeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
655 {
651 m_host.AddScriptLPS(1); 656 m_host.AddScriptLPS(1);
652 UUID agentId = new UUID(); 657 UUID agentId = new UUID();
653 if (UUID.TryParse(agent, out agentId)) 658 if (UUID.TryParse(agent, out agentId))
@@ -660,7 +665,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
660 == World.LandChannel.GetLandObject( 665 == World.LandChannel.GetLandObject(
661 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) 666 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
662 { 667 {
663
664 // Check for hostname , attempt to make a hglink 668 // Check for hostname , attempt to make a hglink
665 // and convert the regionName to the target region 669 // and convert the regionName to the target region
666 if (regionName.Contains(".") && regionName.Contains(":")) 670 if (regionName.Contains(".") && regionName.Contains(":"))
@@ -670,7 +674,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
670 if (regions != null && regions.Count > 0) 674 if (regions != null && regions.Count > 0)
671 { 675 {
672 GridRegion regInfo = regions[0]; 676 GridRegion regInfo = regions[0];
673 regionName = regInfo.RegionName; 677 string[] parts = regInfo.RegionName.Split(new char[] { ':' });
678 if (parts.Length > 2)
679 regionName = parts[2];
680 else
681 regionName = parts[0];
674 } 682 }
675 } 683 }
676 World.RequestTeleportLocation(presence.ControllingClient, regionName, 684 World.RequestTeleportLocation(presence.ControllingClient, regionName,
@@ -683,13 +691,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
683 } 691 }
684 } 692 }
685 693
686 // Teleport functions
687 public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) 694 public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
688 { 695 {
689 // High because there is no security check. High griefer potential 696 // High because there is no security check. High griefer potential
690 // 697 //
691 CheckThreatLevel(ThreatLevel.High, "osTeleportAgent"); 698 CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
692 699
700 TeleportAgent(agent, regionX, regionY, position, lookat);
701 }
702
703 private void TeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
704 {
693 ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize)); 705 ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
694 706
695 m_host.AddScriptLPS(1); 707 m_host.AddScriptLPS(1);
@@ -718,6 +730,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
718 osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat); 730 osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat);
719 } 731 }
720 732
733 public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
734 {
735 // Threat level None because this is what can already be done with the World Map in the viewer
736 CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
737
738 TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat);
739 }
740
741 public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
742 {
743 osTeleportOwner(World.RegionInfo.RegionName, position, lookat);
744 }
745
746 public void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
747 {
748 CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
749
750 TeleportAgent(m_host.OwnerID.ToString(), regionX, regionY, position, lookat);
751 }
752
721 // Functions that get information from the agent itself. 753 // Functions that get information from the agent itself.
722 // 754 //
723 // osGetAgentIP - this is used to determine the IP address of 755 // osGetAgentIP - this is used to determine the IP address of