Tweak IPathSearch to avoid exposing the OpenQueue directly.

This commit is contained in:
RoosterDragon
2015-08-20 23:26:35 +01:00
parent 774992c246
commit 77923a27c1
2 changed files with 6 additions and 9 deletions

View File

@@ -121,7 +121,7 @@ namespace OpenRA.Mods.Common.Traits
List<CPos> path = null;
while (!search.OpenQueue.Empty)
while (search.CanExpand)
{
var p = search.Expand();
if (search.IsTarget(p))
@@ -156,7 +156,7 @@ namespace OpenRA.Mods.Common.Traits
fromDest.Debug = true;
}
while (!fromSrc.OpenQueue.Empty && !fromDest.OpenQueue.Empty)
while (fromSrc.CanExpand && fromDest.CanExpand)
{
// make some progress on the first search
var p = fromSrc.Expand();