Add map.contains check to CanStayInCell

This commit is contained in:
teinarss
2020-05-11 17:44:09 +02:00
committed by abcdefg30
parent 98d5b8c7cc
commit b8a5750529

View File

@@ -312,6 +312,9 @@ namespace OpenRA.Mods.Common.Traits
public bool CanStayInCell(CPos cell)
{
if (!world.Map.Contains(cell))
return false;
return !GetCache(cell).CellFlag.HasCellFlag(CellFlag.HasTransitOnlyActor);
}