Add plumbing to support ownership checks in MobileInfo.CanEnterCell.

This commit is contained in:
Paul Chote
2011-07-10 16:54:56 +12:00
parent 47ba4cb285
commit 64b88819a9
9 changed files with 25 additions and 23 deletions

View File

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