aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorDiva Canto2016-06-12 14:48:30 -0700
committerDiva Canto2016-06-12 14:48:30 -0700
commitc2e63e807e4b0204f63e3db6f929acb18845bf5e (patch)
treea89883a9290ffc839b41164ec68359e019286cf7 /OpenSim/Region/ScriptEngine
parentStill mantis #7858: send kill object / update to child agents too (diff)
downloadopensim-SC_OLD-c2e63e807e4b0204f63e3db6f929acb18845bf5e.zip
opensim-SC_OLD-c2e63e807e4b0204f63e3db6f929acb18845bf5e.tar.gz
opensim-SC_OLD-c2e63e807e4b0204f63e3db6f929acb18845bf5e.tar.bz2
opensim-SC_OLD-c2e63e807e4b0204f63e3db6f929acb18845bf5e.tar.xz
Mantis #7861. llEdgeOfWorld not working. Two reasons: (1) edge was being filled but not used; (2) region size was being ignored when computing the neighbors' coordinates.
Not sure if this is the intended semantics of this function, but it made sense in my varregion test with neighbors all around except in the South.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ad444eb..fac361f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6409,7 +6409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6409 else 6409 else
6410 { 6410 {
6411 // Y is the only valid direction 6411 // Y is the only valid direction
6412 edge.y = dir.y / Math.Abs(dir.y); 6412 edge.y = dir.y / Math.Abs(dir.y) * (World.RegionInfo.RegionSizeY / Constants.RegionSize);
6413 } 6413 }
6414 } 6414 }
6415 else 6415 else
@@ -6431,20 +6431,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6431 if (edge.y > World.RegionInfo.RegionSizeY || edge.y < 0) 6431 if (edge.y > World.RegionInfo.RegionSizeY || edge.y < 0)
6432 { 6432 {
6433 // Y goes out of bounds first 6433 // Y goes out of bounds first
6434 edge.y = dir.y / Math.Abs(dir.y); 6434 edge.y = dir.y / Math.Abs(dir.y) * (World.RegionInfo.RegionSizeY / Constants.RegionSize);
6435 } 6435 }
6436 else 6436 else
6437 { 6437 {
6438 // X goes out of bounds first or its a corner exit 6438 // X goes out of bounds first or its a corner exit
6439 edge.y = 0; 6439 edge.y = 0;
6440 edge.x = dir.x / Math.Abs(dir.x); 6440 edge.x = dir.x / Math.Abs(dir.x) * (World.RegionInfo.RegionSizeY / Constants.RegionSize);
6441 } 6441 }
6442 } 6442 }
6443 6443
6444 List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID); 6444 List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
6445 6445
6446 uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; 6446 uint neighborX = World.RegionInfo.RegionLocX + (uint)edge.x;
6447 uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; 6447 uint neighborY = World.RegionInfo.RegionLocY + (uint)edge.y;
6448 6448
6449 foreach (GridRegion sri in neighbors) 6449 foreach (GridRegion sri in neighbors)
6450 { 6450 {