GetAvailableSubCell should block cells outside the map

This commit is contained in:
teinarss
2019-08-28 22:13:30 +02:00
committed by reaperrr
parent 9516ee511d
commit 6795fb6967

View File

@@ -298,8 +298,7 @@ namespace OpenRA.Mods.Common.Traits
public SubCell GetAvailableSubCell(Actor self, CPos cell, SubCell preferredSubCell = SubCell.Any, Actor ignoreActor = null, CellConditions check = CellConditions.All)
{
var cost = cellsCost[cell];
if (cost == short.MaxValue)
if (MovementCostForCell(cell) == short.MaxValue)
return SubCell.Invalid;
if (check.HasCellCondition(CellConditions.TransientActors))