aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs29
1 files changed, 22 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 7620df3..1e8dec8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -56,6 +56,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
56using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; 56using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
57using PrimType = OpenSim.Region.Framework.Scenes.PrimType; 57using PrimType = OpenSim.Region.Framework.Scenes.PrimType;
58using AssetLandmark = OpenSim.Framework.AssetLandmark; 58using AssetLandmark = OpenSim.Framework.AssetLandmark;
59using RegionFlags = OpenSim.Framework.RegionFlags;
59 60
60using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 61using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
61using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; 62using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
@@ -9313,11 +9314,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9313 9314
9314 GridRegion info; 9315 GridRegion info;
9315 9316
9316 if (m_ScriptEngine.World.RegionInfo.RegionName == simulator) //Det data for this simulator? 9317 if (World.RegionInfo.RegionName == simulator)
9317 9318 info = new GridRegion(World.RegionInfo);
9318 info = new GridRegion(m_ScriptEngine.World.RegionInfo);
9319 else 9319 else
9320 info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator); 9320 info = World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
9321 9321
9322 switch (data) 9322 switch (data)
9323 { 9323 {
@@ -9327,9 +9327,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9327 ScriptSleep(1000); 9327 ScriptSleep(1000);
9328 return UUID.Zero.ToString(); 9328 return UUID.Zero.ToString();
9329 } 9329 }
9330 if (m_ScriptEngine.World.RegionInfo.RegionName != simulator) 9330
9331 bool isHypergridRegion = false;
9332
9333 if (World.RegionInfo.RegionName != simulator && info.RegionSecret != "")
9334 {
9335 // Hypergrid is currently placing real destination region co-ords into RegionSecret.
9336 // But other code can also use this field for a genuine RegionSecret! Therefore, if
9337 // anything is present we need to disambiguate.
9338 //
9339 // FIXME: Hypergrid should be storing this data in a different field.
9340 RegionFlags regionFlags
9341 = (RegionFlags)m_ScriptEngine.World.GridService.GetRegionFlags(
9342 info.ScopeID, info.RegionID);
9343 isHypergridRegion = (regionFlags & RegionFlags.Hyperlink) != 0;
9344 }
9345
9346 if (isHypergridRegion)
9331 { 9347 {
9332 //Hypergrid Region co-ordinates
9333 uint rx = 0, ry = 0; 9348 uint rx = 0, ry = 0;
9334 Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry); 9349 Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry);
9335 9350
@@ -9340,7 +9355,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9340 } 9355 }
9341 else 9356 else
9342 { 9357 {
9343 //Local-cooridnates 9358 // Local grid co-oridnates
9344 reply = new LSL_Vector( 9359 reply = new LSL_Vector(
9345 info.RegionLocX, 9360 info.RegionLocX,
9346 info.RegionLocY, 9361 info.RegionLocY,