aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs21
1 files changed, 3 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7a2b24f..319f14c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3347,24 +3347,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3347 CheckThreatLevel(ThreatLevel.None, "osGetRegionSize"); 3347 CheckThreatLevel(ThreatLevel.None, "osGetRegionSize");
3348 m_host.AddScriptLPS(1); 3348 m_host.AddScriptLPS(1);
3349 3349
3350 bool isMegaregion; 3350 Scene scene = m_ScriptEngine.World;
3351 IRegionCombinerModule rcMod = World.RequestModuleInterface<IRegionCombinerModule>(); 3351 GridRegion region = scene.GridService.GetRegionByUUID(UUID.Zero, World.RegionInfo.RegionID);
3352 if (rcMod != null) 3352 return new LSL_Vector((float)region.RegionSizeX, (float)region.RegionSizeY, (float)Constants.RegionHeight);
3353 isMegaregion = rcMod.IsRootForMegaregion(World.RegionInfo.RegionID);
3354 else
3355 isMegaregion = false;
3356
3357 if (isMegaregion)
3358 {
3359 Vector2 size = rcMod.GetSizeOfMegaregion(World.RegionInfo.RegionID);
3360 return new LSL_Vector(size.X, size.Y, Constants.RegionHeight);
3361 }
3362 else
3363 {
3364 Scene scene = m_ScriptEngine.World;
3365 GridRegion region = scene.GridService.GetRegionByUUID(UUID.Zero, World.RegionInfo.RegionID);
3366 return new LSL_Vector((float)region.RegionSizeX, (float)region.RegionSizeY, (float)Constants.RegionHeight);
3367 }
3368 } 3353 }
3369 3354
3370 public int osGetSimulatorMemory() 3355 public int osGetSimulatorMemory()