From 54ccca1e2cb8af5d0fdc420f64574a7d7b13c94b Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 31 Mar 2009 02:00:33 +0000 Subject: Update svn properties, add copyright header, formatting cleanup. --- .../Shared/Api/Implementation/LSL_Api.cs | 56 +++++++++++----------- .../Shared/Api/Implementation/Plugins/Timer.cs | 1 - 2 files changed, 28 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') 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 if (dir.x == 0) { - if (dir.y == 0) - { - // Direction vector is 0,0 so return - // false since we're staying in the sim - return 0; - } - else - { - // Y is the only valid direction - edge.y = dir.y / Math.Abs(dir.y); - } + if (dir.y == 0) + { + // Direction vector is 0,0 so return + // false since we're staying in the sim + return 0; + } + else + { + // Y is the only valid direction + edge.y = dir.y / Math.Abs(dir.y); + } } else { LSL_Float mag; - if (dir.x > 0) - { + if (dir.x > 0) + { mag = (Constants.RegionSize - pos.x) / dir.x; - } - else - { + } + else + { mag = (pos.x/dir.x); - } + } mag = Math.Abs(mag); @@ -5028,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (edge.y > Constants.RegionSize || edge.y < 0) { - // Y goes out of bounds first + // Y goes out of bounds first edge.y = dir.y / Math.Abs(dir.y); } else @@ -5039,18 +5039,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - List neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); + List neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); - uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; - uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; - - foreach (SimpleRegionInfo sri in neighbors) - { - if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) - return 0; - } + uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; + uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; + + foreach (SimpleRegionInfo sri in neighbors) + { + if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) + return 0; + } - return 1; + return 1; } /// 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 { return localID.ToString() + itemID.ToString(); } - private class TimerClass { -- cgit v1.1