Allow units to give way when path is blocked by oncoming unit.
This commit is contained in:
@@ -32,6 +32,16 @@ namespace OpenRA.Traits
|
||||
Dead = 32
|
||||
}
|
||||
|
||||
// NOTE: Each subsequent category is a superset of the previous categories
|
||||
// and categories are mutually exclusive.
|
||||
public enum BlockedByActor
|
||||
{
|
||||
None,
|
||||
Immovable,
|
||||
Stationary,
|
||||
All
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Type tag for DamageTypes <see cref="Primitives.BitSet{T}"/>.
|
||||
/// </summary>
|
||||
@@ -312,16 +322,16 @@ namespace OpenRA.Traits
|
||||
|
||||
public interface IPositionableInfo : IOccupySpaceInfo
|
||||
{
|
||||
bool CanEnterCell(World world, Actor self, CPos cell, Actor ignoreActor = null, bool checkTransientActors = true);
|
||||
bool CanEnterCell(World world, Actor self, CPos cell, Actor ignoreActor = null, BlockedByActor check = BlockedByActor.All);
|
||||
}
|
||||
|
||||
public interface IPositionable : IOccupySpace
|
||||
{
|
||||
bool CanExistInCell(CPos location);
|
||||
bool IsLeavingCell(CPos location, SubCell subCell = SubCell.Any);
|
||||
bool CanEnterCell(CPos location, Actor ignoreActor = null, bool checkTransientActors = true);
|
||||
bool CanEnterCell(CPos location, Actor ignoreActor = null, BlockedByActor check = BlockedByActor.All);
|
||||
SubCell GetValidSubCell(SubCell preferred = SubCell.Any);
|
||||
SubCell GetAvailableSubCell(CPos location, SubCell preferredSubCell = SubCell.Any, Actor ignoreActor = null, bool checkTransientActors = true);
|
||||
SubCell GetAvailableSubCell(CPos location, SubCell preferredSubCell = SubCell.Any, Actor ignoreActor = null, BlockedByActor check = BlockedByActor.All);
|
||||
void SetPosition(Actor self, CPos cell, SubCell subCell = SubCell.Any);
|
||||
void SetPosition(Actor self, WPos pos);
|
||||
void SetVisualPosition(Actor self, WPos pos);
|
||||
|
||||
Reference in New Issue
Block a user