aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs31
1 files changed, 23 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 49f0ef7..7cf193d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -59,6 +59,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
59using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; 59using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
60using PrimType = OpenSim.Region.Framework.Scenes.PrimType; 60using PrimType = OpenSim.Region.Framework.Scenes.PrimType;
61using AssetLandmark = OpenSim.Framework.AssetLandmark; 61using AssetLandmark = OpenSim.Framework.AssetLandmark;
62using RegionFlags = OpenSim.Framework.RegionFlags;
62 63
63using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 64using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
64using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; 65using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
@@ -6918,7 +6919,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6918 GridInstantMessage msg = new GridInstantMessage(World, 6919 GridInstantMessage msg = new GridInstantMessage(World,
6919 m_host.OwnerID, m_host.Name, destID, 6920 m_host.OwnerID, m_host.Name, destID,
6920 (byte)InstantMessageDialog.TaskInventoryOffered, 6921 (byte)InstantMessageDialog.TaskInventoryOffered,
6921 false, string.Format("'{0}'"), 6922 false, string.Format("'{0}'", category),
6922// We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06 6923// We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06
6923// false, string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z), 6924// false, string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z),
6924 folderID, false, pos, 6925 folderID, false, pos,
@@ -10058,11 +10059,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10058 10059
10059 GridRegion info; 10060 GridRegion info;
10060 10061
10061 if (m_ScriptEngine.World.RegionInfo.RegionName == simulator) //Det data for this simulator? 10062 if (World.RegionInfo.RegionName == simulator)
10062 10063 info = new GridRegion(World.RegionInfo);
10063 info = new GridRegion(m_ScriptEngine.World.RegionInfo);
10064 else 10064 else
10065 info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator); 10065 info = World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
10066 10066
10067 switch (data) 10067 switch (data)
10068 { 10068 {
@@ -10072,9 +10072,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10072 ScriptSleep(1000); 10072 ScriptSleep(1000);
10073 return UUID.Zero.ToString(); 10073 return UUID.Zero.ToString();
10074 } 10074 }
10075 if (m_ScriptEngine.World.RegionInfo.RegionName != simulator) 10075
10076 bool isHypergridRegion = false;
10077
10078 if (World.RegionInfo.RegionName != simulator && info.RegionSecret != "")
10079 {
10080 // Hypergrid is currently placing real destination region co-ords into RegionSecret.
10081 // But other code can also use this field for a genuine RegionSecret! Therefore, if
10082 // anything is present we need to disambiguate.
10083 //
10084 // FIXME: Hypergrid should be storing this data in a different field.
10085 RegionFlags regionFlags
10086 = (RegionFlags)m_ScriptEngine.World.GridService.GetRegionFlags(
10087 info.ScopeID, info.RegionID);
10088 isHypergridRegion = (regionFlags & RegionFlags.Hyperlink) != 0;
10089 }
10090
10091 if (isHypergridRegion)
10076 { 10092 {
10077 //Hypergrid Region co-ordinates
10078 uint rx = 0, ry = 0; 10093 uint rx = 0, ry = 0;
10079 Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry); 10094 Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry);
10080 10095
@@ -10085,7 +10100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10085 } 10100 }
10086 else 10101 else
10087 { 10102 {
10088 //Local-cooridnates 10103 // Local grid co-oridnates
10089 reply = new LSL_Vector( 10104 reply = new LSL_Vector(
10090 info.RegionLocX, 10105 info.RegionLocX,
10091 info.RegionLocY, 10106 info.RegionLocY,