Fix GiveUnitCrateAction being limited to MobileInfo
This commit is contained in:
@@ -97,11 +97,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
IEnumerable<CPos> GetSuitableCells(CPos near, string unitName)
|
||||
{
|
||||
var mi = self.World.Map.Rules.Actors[unitName].TraitInfo<MobileInfo>();
|
||||
var ip = self.World.Map.Rules.Actors[unitName].TraitInfo<IPositionableInfo>();
|
||||
|
||||
for (var i = -1; i < 2; i++)
|
||||
for (var j = -1; j < 2; j++)
|
||||
if (mi.CanEnterCell(self.World, self, near + new CVec(i, j)))
|
||||
if (ip.CanEnterCell(self.World, self, near + new CVec(i, j)))
|
||||
yield return near + new CVec(i, j);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user