Fix actors with immobile actors that don't occupy space
to be placed everywhere way outside the map boundaries.
This commit is contained in:
committed by
abcdefg30
parent
74c35edbd9
commit
81020e70fa
@@ -74,7 +74,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var subCellInit = reference.GetOrDefault<SubCellInit>();
|
||||
var subCell = subCellInit != null ? subCellInit.Value : SubCell.Any;
|
||||
|
||||
Footprint = ios?.OccupiedCells(Info, location, subCell) ?? new Dictionary<CPos, SubCell>() { { location, SubCell.FullCell } };
|
||||
var occupiedCells = ios?.OccupiedCells(Info, location, subCell);
|
||||
if (occupiedCells == null || occupiedCells.Count == 0)
|
||||
Footprint = new Dictionary<CPos, SubCell>() { { location, SubCell.FullCell } };
|
||||
else
|
||||
Footprint = occupiedCells;
|
||||
|
||||
tooltip = Info.TraitInfos<EditorOnlyTooltipInfo>().FirstOrDefault(info => info.EnabledByDefault) as TooltipInfoBase
|
||||
?? Info.TraitInfos<TooltipInfo>().FirstOrDefault(info => info.EnabledByDefault);
|
||||
|
||||
Reference in New Issue
Block a user