aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
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
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')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs38
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs15
5 files changed, 57 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
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index fbf601a..028bb42 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -86,6 +86,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
86 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 86 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
87 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 87 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
88 void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 88 void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
89 void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
90 void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
91 void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
89 92
90 // Animation commands 93 // Animation commands
91 void osAvatarPlayAnimation(string avatar, string animation); 94 void osAvatarPlayAnimation(string avatar, string animation);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 0342283..93d544b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -508,6 +508,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
508 public const int PARCEL_DETAILS_OWNER = 2; 508 public const int PARCEL_DETAILS_OWNER = 2;
509 public const int PARCEL_DETAILS_GROUP = 3; 509 public const int PARCEL_DETAILS_GROUP = 3;
510 public const int PARCEL_DETAILS_AREA = 4; 510 public const int PARCEL_DETAILS_AREA = 4;
511 public const int PARCEL_DETAILS_ID = 5;
511 512
512 // constants for llSetClickAction 513 // constants for llSetClickAction
513 public const int CLICK_ACTION_NONE = 0; 514 public const int CLICK_ACTION_NONE = 0;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index e289554..370bf1d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -227,6 +227,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
227 m_OSSL_Functions.osTeleportAgent(agent, position, lookat); 227 m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
228 } 228 }
229 229
230 public void osTeleportOwner(string regionName, vector position, vector lookat)
231 {
232 m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
233 }
234
235 public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
236 {
237 m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
238 }
239
240 public void osTeleportOwner(vector position, vector lookat)
241 {
242 m_OSSL_Functions.osTeleportOwner(position, lookat);
243 }
244
230 // Avatar info functions 245 // Avatar info functions
231 public string osGetAgentIP(string agent) 246 public string osGetAgentIP(string agent)
232 { 247 {