aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 31ea067..73174b4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2927,6 +2927,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2927 return ret; 2927 return ret;
2928 } 2928 }
2929 2929
2930 public LSL_Vector osGetRegionSize()
2931 {
2932 CheckThreatLevel(ThreatLevel.None, "osGetRegionSize");
2933 m_host.AddScriptLPS(1);
2934
2935 bool isMegaregion;
2936 IRegionCombinerModule rcMod = World.RequestModuleInterface<IRegionCombinerModule>();
2937 if (rcMod != null)
2938 isMegaregion = rcMod.IsRootForMegaregion(World.RegionInfo.RegionID);
2939 else
2940 isMegaregion = false;
2941
2942 if (isMegaregion)
2943 {
2944 Vector2 size = rcMod.GetSizeOfMegaregion(World.RegionInfo.RegionID);
2945 return new LSL_Vector(size.X, size.Y, Constants.RegionHeight);
2946 }
2947 else
2948 {
2949 return new LSL_Vector((float)Constants.RegionSize, (float)Constants.RegionSize, Constants.RegionHeight);
2950 }
2951 }
2952
2930 public int osGetSimulatorMemory() 2953 public int osGetSimulatorMemory()
2931 { 2954 {
2932 CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); 2955 CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory");