Allow BuildingInfluence to track overlapping buildings in the same cell.

This commit is contained in:
Paul Chote
2021-03-28 13:05:11 +01:00
committed by reaperrr
parent bc286b78bf
commit a1df91b665
3 changed files with 47 additions and 15 deletions

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Mods.D2k.Traits.Buildings
continue;
// Don't place under other buildings (or their bib)
if (bi.GetBuildingAt(c) != self)
if (bi.GetBuildingsAt(c).Any(a => a != self))
continue;
var index = Game.CosmeticRandom.Next(template.TilesCount);
@@ -115,7 +115,7 @@ namespace OpenRA.Mods.D2k.Traits.Buildings
continue;
// Don't place under other buildings (or their bib)
if (bi.GetBuildingAt(c) != self)
if (bi.GetBuildingsAt(c).Any(a => a != self))
continue;
layer.AddTile(c, new TerrainTile(template.Id, (byte)i));