Fix GetActorsAt(CPos, SubCell) with special-case subcells.

If given FullCell or Any we should be returning actors in
any subcell, not none.
This commit is contained in:
Paul Chote
2020-03-02 18:34:38 +00:00
committed by abcdefg30
parent 4a6fefa434
commit d2f306e488

View File

@@ -265,7 +265,7 @@ namespace OpenRA.Mods.Common.Traits
var layer = a.Layer == 0 ? influence : customInfluence[a.Layer];
for (var i = layer[uv]; i != null; i = i.Next)
if (!i.Actor.Disposed && (i.SubCell == sub || i.SubCell == SubCell.FullCell))
if (!i.Actor.Disposed && (i.SubCell == sub || i.SubCell == SubCell.FullCell || sub == SubCell.FullCell || sub == SubCell.Any))
yield return i.Actor;
}