diff options
author | TBG Renfold | 2012-10-09 14:56:25 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-13 00:50:34 +0100 |
commit | f6e166cd0bfc868fe17fb003390872ae70190177 (patch) | |
tree | 4c29c3492da0e210c91416863e6fcf4b23a2f17b /OpenSim | |
parent | Get rid of accidental scene start left in ScenePresenceAutopilotTests (diff) | |
download | opensim-SC_OLD-f6e166cd0bfc868fe17fb003390872ae70190177.zip opensim-SC_OLD-f6e166cd0bfc868fe17fb003390872ae70190177.tar.gz opensim-SC_OLD-f6e166cd0bfc868fe17fb003390872ae70190177.tar.bz2 opensim-SC_OLD-f6e166cd0bfc868fe17fb003390872ae70190177.tar.xz |
Now using region flags for llRequestSimulatorData DATA_SIM_POS.
If the region is not classed a hypergrid region, then the region secret is checked to make sure that it is a valid UUID.
Just a temporary fix at this time.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 25 |
1 files changed, 17 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 7620df3..6b08b00 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; | |||
56 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; | 56 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; |
57 | using PrimType = OpenSim.Region.Framework.Scenes.PrimType; | 57 | using PrimType = OpenSim.Region.Framework.Scenes.PrimType; |
58 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | 58 | using AssetLandmark = OpenSim.Framework.AssetLandmark; |
59 | using RegionFlags = OpenSim.Framework.RegionFlags; | ||
59 | 60 | ||
60 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | 61 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; |
61 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | 62 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; |
@@ -9327,12 +9328,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9327 | ScriptSleep(1000); | 9328 | ScriptSleep(1000); |
9328 | return UUID.Zero.ToString(); | 9329 | return UUID.Zero.ToString(); |
9329 | } | 9330 | } |
9330 | if (m_ScriptEngine.World.RegionInfo.RegionName != simulator) | 9331 | |
9332 | RegionFlags regionFlags = (RegionFlags)m_ScriptEngine.World.GridService.GetRegionFlags(info.ScopeID, info.RegionID); | ||
9333 | if ((regionFlags & RegionFlags.Hyperlink) != 0) | ||
9331 | { | 9334 | { |
9332 | //Hypergrid Region co-ordinates | ||
9333 | uint rx = 0, ry = 0; | 9335 | uint rx = 0, ry = 0; |
9336 | //Hypergrid Region co-ordinates | ||
9334 | Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry); | 9337 | Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry); |
9335 | |||
9336 | reply = new LSL_Vector( | 9338 | reply = new LSL_Vector( |
9337 | rx, | 9339 | rx, |
9338 | ry, | 9340 | ry, |
@@ -9340,11 +9342,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9340 | } | 9342 | } |
9341 | else | 9343 | else |
9342 | { | 9344 | { |
9343 | //Local-cooridnates | 9345 | UUID regionSecret = UUID.Zero; |
9344 | reply = new LSL_Vector( | 9346 | if (UUID.TryParse(info.RegionSecret, out regionSecret)) |
9345 | info.RegionLocX, | 9347 | { |
9346 | info.RegionLocY, | 9348 | if (regionSecret != UUID.Zero) |
9347 | 0).ToString(); | 9349 | { |
9350 | //Local co-oridnates | ||
9351 | reply = new LSL_Vector( | ||
9352 | info.RegionLocX, | ||
9353 | info.RegionLocY, | ||
9354 | 0).ToString(); | ||
9355 | } | ||
9356 | } | ||
9348 | } | 9357 | } |
9349 | break; | 9358 | break; |
9350 | case ScriptBaseClass.DATA_SIM_STATUS: | 9359 | case ScriptBaseClass.DATA_SIM_STATUS: |