Units heading in generally opposite directions are now considered blockers; this fixes pathing deadlocks.

This commit is contained in:
James Dunne
2012-07-05 23:35:59 -05:00
parent 9c9a16d80e
commit ba1a36f26e
9 changed files with 47 additions and 28 deletions

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA.Move
{
this.getPath = (self,mobile) =>
self.World.WorldActor.Trait<PathFinder>().FindPath(
PathSearch.FromPoint( self.World, mobile.Info, self.Owner, mobile.toCell, destination, false )
PathSearch.FromPoint( self.World, mobile.Info, self, mobile.toCell, destination, false )
.WithoutLaneBias());
this.destination = destination;
this.nearEnough = 0;
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA.Move
{
this.getPath = (self,mobile) =>
self.World.WorldActor.Trait<PathFinder>().FindPath(
PathSearch.FromPoint( self.World, mobile.Info, self.Owner, mobile.toCell, destination, false )
PathSearch.FromPoint( self.World, mobile.Info, self, mobile.toCell, destination, false )
.WithIgnoredBuilding( ignoreBuilding ));
this.destination = destination;