moved directions to a shared place; fixed pathfinder to use the appropriate movement type

This commit is contained in:
Chris Forbes
2009-10-26 10:45:29 +13:00
parent e61ef4a93f
commit 482273f604
4 changed files with 47 additions and 28 deletions

View File

@@ -5,6 +5,7 @@ using System.Text;
using OpenRa.Game.GameRules;
using IjwFramework.Types;
using IjwFramework.Collections;
using OpenRa.Game.Graphics;
namespace OpenRa.Game
{
@@ -66,7 +67,7 @@ namespace OpenRa.Game
if (c.distance + 1 > maxDistance) continue;
foreach (var d in PathFinder.directions)
foreach (var d in Util.directions)
{
var e = c.location + d;
if (e.X < min.X || e.Y < min.Y || e.X > max.X || e.Y > max.Y)