Use cell positioning to look up resupply actors. Fixes #3901.

FindActorsInBox only checks against the centre of
actors, so testing two points is rarely going to
work.
This commit is contained in:
Paul Chote
2013-10-05 23:28:09 +13:00
parent 86ad0e63e4
commit 9ee9de01b1
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA.Activities
{
if (!limitedAmmo.GiveAmmo()) return NextActivity;
var hostBuilding = self.World.FindActorsInBox(self.CenterPosition, self.CenterPosition)
var hostBuilding = self.World.ActorMap.GetUnitsAt(self.Location)
.FirstOrDefault(a => a.HasTrait<RenderBuilding>());
if (hostBuilding != null)