diff options
author | Melanie | 2014-01-28 21:02:20 +0000 |
---|---|---|
committer | Melanie | 2014-01-28 21:02:20 +0000 |
commit | c6e9db58669d773c85041db99b19b942f70324f7 (patch) | |
tree | 99f69fb669332cff69a45ce6f7473aed6d965a0d /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'justincc-master' (diff) | |
download | opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.zip opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.tar.gz opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.tar.bz2 opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/RegionSettings.cs
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 23 |
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 5c57971..c474173 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3005,6 +3005,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3005 | return ret; | 3005 | return ret; |
3006 | } | 3006 | } |
3007 | 3007 | ||
3008 | public LSL_Vector osGetRegionSize() | ||
3009 | { | ||
3010 | CheckThreatLevel(ThreatLevel.None, "osGetRegionSize"); | ||
3011 | m_host.AddScriptLPS(1); | ||
3012 | |||
3013 | bool isMegaregion; | ||
3014 | IRegionCombinerModule rcMod = World.RequestModuleInterface<IRegionCombinerModule>(); | ||
3015 | if (rcMod != null) | ||
3016 | isMegaregion = rcMod.IsRootForMegaregion(World.RegionInfo.RegionID); | ||
3017 | else | ||
3018 | isMegaregion = false; | ||
3019 | |||
3020 | if (isMegaregion) | ||
3021 | { | ||
3022 | Vector2 size = rcMod.GetSizeOfMegaregion(World.RegionInfo.RegionID); | ||
3023 | return new LSL_Vector(size.X, size.Y, Constants.RegionHeight); | ||
3024 | } | ||
3025 | else | ||
3026 | { | ||
3027 | return new LSL_Vector((float)Constants.RegionSize, (float)Constants.RegionSize, Constants.RegionHeight); | ||
3028 | } | ||
3029 | } | ||
3030 | |||
3008 | public int osGetSimulatorMemory() | 3031 | public int osGetSimulatorMemory() |
3009 | { | 3032 | { |
3010 | CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); | 3033 | CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); |