Fix FreeSubCell ignoring preferred subcell requests.
This commit is contained in:
@@ -276,7 +276,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public SubCell FreeSubCell(CPos cell, SubCell preferredSubCell = SubCell.Any, bool checkTransient = true)
|
||||
{
|
||||
if (preferredSubCell > SubCell.Any && !AnyActorsAt(cell, preferredSubCell, checkTransient))
|
||||
if (preferredSubCell != SubCell.Any && !AnyActorsAt(cell, preferredSubCell, checkTransient))
|
||||
return preferredSubCell;
|
||||
|
||||
if (!AnyActorsAt(cell))
|
||||
@@ -291,7 +291,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public SubCell FreeSubCell(CPos cell, SubCell preferredSubCell, Func<Actor, bool> checkIfBlocker)
|
||||
{
|
||||
if (preferredSubCell > SubCell.Any && !AnyActorsAt(cell, preferredSubCell, checkIfBlocker))
|
||||
if (preferredSubCell != SubCell.Any && !AnyActorsAt(cell, preferredSubCell, checkIfBlocker))
|
||||
return preferredSubCell;
|
||||
|
||||
if (!AnyActorsAt(cell))
|
||||
|
||||
Reference in New Issue
Block a user