diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 56 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | 1 |
2 files changed, 28 insertions, 29 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3c1b87f..e32f1b4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4998,29 +4998,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4998 | 4998 | ||
4999 | if (dir.x == 0) | 4999 | if (dir.x == 0) |
5000 | { | 5000 | { |
5001 | if (dir.y == 0) | 5001 | if (dir.y == 0) |
5002 | { | 5002 | { |
5003 | // Direction vector is 0,0 so return | 5003 | // Direction vector is 0,0 so return |
5004 | // false since we're staying in the sim | 5004 | // false since we're staying in the sim |
5005 | return 0; | 5005 | return 0; |
5006 | } | 5006 | } |
5007 | else | 5007 | else |
5008 | { | 5008 | { |
5009 | // Y is the only valid direction | 5009 | // Y is the only valid direction |
5010 | edge.y = dir.y / Math.Abs(dir.y); | 5010 | edge.y = dir.y / Math.Abs(dir.y); |
5011 | } | 5011 | } |
5012 | } | 5012 | } |
5013 | else | 5013 | else |
5014 | { | 5014 | { |
5015 | LSL_Float mag; | 5015 | LSL_Float mag; |
5016 | if (dir.x > 0) | 5016 | if (dir.x > 0) |
5017 | { | 5017 | { |
5018 | mag = (Constants.RegionSize - pos.x) / dir.x; | 5018 | mag = (Constants.RegionSize - pos.x) / dir.x; |
5019 | } | 5019 | } |
5020 | else | 5020 | else |
5021 | { | 5021 | { |
5022 | mag = (pos.x/dir.x); | 5022 | mag = (pos.x/dir.x); |
5023 | } | 5023 | } |
5024 | 5024 | ||
5025 | mag = Math.Abs(mag); | 5025 | mag = Math.Abs(mag); |
5026 | 5026 | ||
@@ -5028,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5028 | 5028 | ||
5029 | if (edge.y > Constants.RegionSize || edge.y < 0) | 5029 | if (edge.y > Constants.RegionSize || edge.y < 0) |
5030 | { | 5030 | { |
5031 | // Y goes out of bounds first | 5031 | // Y goes out of bounds first |
5032 | edge.y = dir.y / Math.Abs(dir.y); | 5032 | edge.y = dir.y / Math.Abs(dir.y); |
5033 | } | 5033 | } |
5034 | else | 5034 | else |
@@ -5039,18 +5039,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5039 | } | 5039 | } |
5040 | } | 5040 | } |
5041 | 5041 | ||
5042 | List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); | 5042 | List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); |
5043 | 5043 | ||
5044 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; | 5044 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; |
5045 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; | 5045 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; |
5046 | 5046 | ||
5047 | foreach (SimpleRegionInfo sri in neighbors) | 5047 | foreach (SimpleRegionInfo sri in neighbors) |
5048 | { | 5048 | { |
5049 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) | 5049 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) |
5050 | return 0; | 5050 | return 0; |
5051 | } | 5051 | } |
5052 | 5052 | ||
5053 | return 1; | 5053 | return 1; |
5054 | } | 5054 | } |
5055 | 5055 | ||
5056 | /// <summary> | 5056 | /// <summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 09351fd..5353fc9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -49,7 +49,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
49 | { | 49 | { |
50 | return localID.ToString() + itemID.ToString(); | 50 | return localID.ToString() + itemID.ToString(); |
51 | } | 51 | } |
52 | |||
53 | 52 | ||
54 | private class TimerClass | 53 | private class TimerClass |
55 | { | 54 | { |