diff options
author | Robert Adams | 2014-01-28 08:50:28 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-28 08:50:28 -0800 |
commit | 8eec717f5f0f34354a73dcfeecdd3e9514d5e435 (patch) | |
tree | fec59ef61f8782d21641a3a16080493d20a420b1 /OpenSim/Region/ScriptEngine/Shared | |
parent | varregion: fix for teleporting by double clicking on a map location. (diff) | |
parent | Merge branch 'justincc-master' (diff) | |
download | opensim-SC_OLD-8eec717f5f0f34354a73dcfeecdd3e9514d5e435.zip opensim-SC_OLD-8eec717f5f0f34354a73dcfeecdd3e9514d5e435.tar.gz opensim-SC_OLD-8eec717f5f0f34354a73dcfeecdd3e9514d5e435.tar.bz2 opensim-SC_OLD-8eec717f5f0f34354a73dcfeecdd3e9514d5e435.tar.xz |
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
3 files changed, 29 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"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 51d0581..519779e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -337,6 +337,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
337 | key osGetMapTexture(); | 337 | key osGetMapTexture(); |
338 | key osGetRegionMapTexture(string regionName); | 338 | key osGetRegionMapTexture(string regionName); |
339 | LSL_List osGetRegionStats(); | 339 | LSL_List osGetRegionStats(); |
340 | vector osGetRegionSize(); | ||
340 | 341 | ||
341 | int osGetSimulatorMemory(); | 342 | int osGetSimulatorMemory(); |
342 | void osKickAvatar(string FirstName,string SurName,string alert); | 343 | void osKickAvatar(string FirstName,string SurName,string alert); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index d81cddc..9c060e5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -865,6 +865,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
865 | return m_OSSL_Functions.osGetRegionStats(); | 865 | return m_OSSL_Functions.osGetRegionStats(); |
866 | } | 866 | } |
867 | 867 | ||
868 | public vector osGetRegionSize() | ||
869 | { | ||
870 | return m_OSSL_Functions.osGetRegionSize(); | ||
871 | } | ||
872 | |||
868 | /// <summary> | 873 | /// <summary> |
869 | /// Returns the amount of memory in use by the Simulator Daemon. | 874 | /// Returns the amount of memory in use by the Simulator Daemon. |
870 | /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware) | 875 | /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware) |