diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
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 | { |