diff options
author | UbitUmarov | 2015-08-19 08:48:50 +0100 |
---|---|---|
committer | UbitUmarov | 2015-08-19 08:48:50 +0100 |
commit | 0b105da626ae8c2fb519a817b827f90534ed7d08 (patch) | |
tree | 509e6d091fb12f38fd09528335e51aeedbe59c08 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Merge branch 'master' into ubitworkmaster (diff) | |
parent | varregion: update MapImageServiceModule to upload multiple map tiles for larg... (diff) | |
download | opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.zip opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.gz opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.bz2 opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.xz |
Merge branch 'mbworkvar2' into ubitvar
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3c8f54f..b5ba4a0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2352,7 +2352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2352 | // | 2352 | // |
2353 | // This workaround is to prevent silent failure of this function. | 2353 | // This workaround is to prevent silent failure of this function. |
2354 | // According to the specification on the SL Wiki, providing a position outside of the | 2354 | // According to the specification on the SL Wiki, providing a position outside of the |
2355 | if (pos.x < 0 || pos.x > Constants.RegionSize || pos.y < 0 || pos.y > Constants.RegionSize) | 2355 | if (pos.x < 0 || pos.x > World.RegionInfo.RegionSizeX || pos.y < 0 || pos.y > World.RegionInfo.RegionSizeY) |
2356 | { | 2356 | { |
2357 | return 0; | 2357 | return 0; |
2358 | } | 2358 | } |
@@ -2362,9 +2362,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2362 | m_host.ParentGroup.IsAttachment || // return FALSE if attachment | 2362 | m_host.ParentGroup.IsAttachment || // return FALSE if attachment |
2363 | ( | 2363 | ( |
2364 | pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. | 2364 | pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. |
2365 | pos.x > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a east-adjacent region. | 2365 | pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region. |
2366 | pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. | 2366 | pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. |
2367 | pos.y > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a north-adjacent region. | 2367 | pos.y > (World.RegionInfo.RegionSizeY + 10) || // return FALSE if more than 10 meters into a north-adjacent region. |
2368 | pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m | 2368 | pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m |
2369 | ) | 2369 | ) |
2370 | ) | 2370 | ) |
@@ -4655,10 +4655,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4655 | DataserverPlugin.RegisterRequest(m_host.LocalId, | 4655 | DataserverPlugin.RegisterRequest(m_host.LocalId, |
4656 | m_item.ItemID, item.AssetID.ToString()); | 4656 | m_item.ItemID, item.AssetID.ToString()); |
4657 | 4657 | ||
4658 | Vector3 region = new Vector3( | 4658 | Vector3 region = new Vector3(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); |
4659 | World.RegionInfo.RegionLocX * Constants.RegionSize, | ||
4660 | World.RegionInfo.RegionLocY * Constants.RegionSize, | ||
4661 | 0); | ||
4662 | 4659 | ||
4663 | World.AssetService.Get(item.AssetID.ToString(), this, | 4660 | World.AssetService.Get(item.AssetID.ToString(), this, |
4664 | delegate(string i, object sender, AssetBase a) | 4661 | delegate(string i, object sender, AssetBase a) |
@@ -5949,7 +5946,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5949 | public LSL_Vector llGetRegionCorner() | 5946 | public LSL_Vector llGetRegionCorner() |
5950 | { | 5947 | { |
5951 | m_host.AddScriptLPS(1); | 5948 | m_host.AddScriptLPS(1); |
5952 | return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0); | 5949 | return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); |
5953 | } | 5950 | } |
5954 | 5951 | ||
5955 | /// <summary> | 5952 | /// <summary> |
@@ -6104,7 +6101,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6104 | LSL_Float mag; | 6101 | LSL_Float mag; |
6105 | if (dir.x > 0) | 6102 | if (dir.x > 0) |
6106 | { | 6103 | { |
6107 | mag = (Constants.RegionSize - pos.x) / dir.x; | 6104 | mag = (World.RegionInfo.RegionSizeX - pos.x) / dir.x; |
6108 | } | 6105 | } |
6109 | else | 6106 | else |
6110 | { | 6107 | { |
@@ -6115,7 +6112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6115 | 6112 | ||
6116 | edge.y = pos.y + (dir.y * mag); | 6113 | edge.y = pos.y + (dir.y * mag); |
6117 | 6114 | ||
6118 | if (edge.y > Constants.RegionSize || edge.y < 0) | 6115 | if (edge.y > World.RegionInfo.RegionSizeY || edge.y < 0) |
6119 | { | 6116 | { |
6120 | // Y goes out of bounds first | 6117 | // Y goes out of bounds first |
6121 | edge.y = dir.y / Math.Abs(dir.y); | 6118 | edge.y = dir.y / Math.Abs(dir.y); |