diff options
author | UbitUmarov | 2019-08-27 21:16:22 +0100 |
---|---|---|
committer | UbitUmarov | 2019-08-27 21:16:22 +0100 |
commit | 718c6d1e4d9fadd99cd9a9e7efe0d616a2378d4a (patch) | |
tree | 2578a2731c9be26e0d3df3314f9f4ab8cb3623ca /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | a few changes to db generic tables (diff) | |
download | opensim-SC-718c6d1e4d9fadd99cd9a9e7efe0d616a2378d4a.zip opensim-SC-718c6d1e4d9fadd99cd9a9e7efe0d616a2378d4a.tar.gz opensim-SC-718c6d1e4d9fadd99cd9a9e7efe0d616a2378d4a.tar.bz2 opensim-SC-718c6d1e4d9fadd99cd9a9e7efe0d616a2378d4a.tar.xz |
mantis 8583: osGetRegionMapTexture(); now returns prim region map textureID, without any requests to grid
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6ee83ae..7494b88 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3563,7 +3563,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3563 | /// </summary> | 3563 | /// </summary> |
3564 | /// <param name="regionName"></param> | 3564 | /// <param name="regionName"></param> |
3565 | /// <returns></returns> | 3565 | /// <returns></returns> |
3566 | public LSL_Key osGetRegionMapTexture(string regionName) | 3566 | public LSL_Key osGetRegionMapTexture(string regionNameOrID) |
3567 | { | 3567 | { |
3568 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); | 3568 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); |
3569 | 3569 | ||
@@ -3571,11 +3571,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3571 | UUID key = UUID.Zero; | 3571 | UUID key = UUID.Zero; |
3572 | GridRegion region; | 3572 | GridRegion region; |
3573 | 3573 | ||
3574 | if(string.IsNullOrWhiteSpace(regionNameOrID)) | ||
3575 | { | ||
3576 | return scene.RegionInfo.RegionSettings.TerrainImageID.ToString(); | ||
3577 | } | ||
3578 | |||
3574 | //If string is a key, use it. Otherwise, try to locate region by name. | 3579 | //If string is a key, use it. Otherwise, try to locate region by name. |
3575 | if (UUID.TryParse(regionName, out key)) | 3580 | if (UUID.TryParse(regionNameOrID, out key)) |
3576 | region = scene.GridService.GetRegionByUUID(UUID.Zero, key); | 3581 | region = scene.GridService.GetRegionByUUID(UUID.Zero, key); |
3577 | else | 3582 | else |
3578 | region = scene.GridService.GetRegionByName(UUID.Zero, regionName); | 3583 | region = scene.GridService.GetRegionByName(UUID.Zero, regionNameOrID); |
3579 | 3584 | ||
3580 | // If region was found, return the regions map texture key. | 3585 | // If region was found, return the regions map texture key. |
3581 | if (region != null) | 3586 | if (region != null) |