Units heading in generally opposite directions are now considered blockers; this fixes pathing deadlocks.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
var mobile = self.Trait<Mobile>();
|
||||
|
||||
var ps1 = new PathSearch( self.World, mobile.Info, self.Owner )
|
||||
var ps1 = new PathSearch( self.World, mobile.Info, self )
|
||||
{
|
||||
checkForBlocked = true,
|
||||
heuristic = location => 0,
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
ps1.heuristic = PathSearch.DefaultEstimator( mobile.toCell );
|
||||
|
||||
var ps2 = PathSearch.FromPoint( self.World, mobile.Info, self.Owner, mobile.toCell, target.CenterLocation.ToCPos(), true );
|
||||
var ps2 = PathSearch.FromPoint( self.World, mobile.Info, self, mobile.toCell, target.CenterLocation.ToCPos(), true );
|
||||
var ret = self.World.WorldActor.Trait<PathFinder>().FindBidiPath( ps1, ps2 );
|
||||
|
||||
return Util.SequenceActivities( mobile.MoveTo( () => ret ), this );
|
||||
|
||||
Reference in New Issue
Block a user