Tweak IPathSearch to avoid exposing the OpenQueue directly.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user