mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 08:32:36 +00:00
Fix units in formation blocking construction and not moving out of the way (see #779).
Make non-movement-blocking buildings (e.g. farms) not require units to move out of the way. This was SVN commit r9510.
This commit is contained in:
@@ -289,6 +289,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool GetBlockMovementFlag()
|
||||
{
|
||||
return (m_TemplateFlags & ICmpObstructionManager::FLAG_BLOCK_MOVEMENT) != 0;
|
||||
}
|
||||
|
||||
virtual ICmpObstructionManager::tag_t GetObstruction()
|
||||
{
|
||||
return m_Tag;
|
||||
|
||||
@@ -27,5 +27,6 @@ DEFINE_INTERFACE_METHOD_0("CheckFoundationCollisions", bool, ICmpObstruction, Ch
|
||||
DEFINE_INTERFACE_METHOD_0("GetConstructionCollisions", std::vector<entity_id_t>, ICmpObstruction, GetConstructionCollisions)
|
||||
DEFINE_INTERFACE_METHOD_1("SetActive", void, ICmpObstruction, SetActive, bool)
|
||||
DEFINE_INTERFACE_METHOD_1("SetDisableBlockMovementPathfinding", void, ICmpObstruction, SetDisableBlockMovementPathfinding, bool)
|
||||
DEFINE_INTERFACE_METHOD_0("GetBlockMovementFlag", bool, ICmpObstruction, GetBlockMovementFlag)
|
||||
DEFINE_INTERFACE_METHOD_1("SetControlGroup", void, ICmpObstruction, SetControlGroup, entity_id_t)
|
||||
END_INTERFACE_WRAPPER(Obstruction)
|
||||
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
|
||||
virtual void SetDisableBlockMovementPathfinding(bool disabled) = 0;
|
||||
|
||||
virtual bool GetBlockMovementFlag() = 0;
|
||||
|
||||
/**
|
||||
* Change the control group that the entity belongs to.
|
||||
* Control groups are used to let units ignore collisions with other units from
|
||||
|
||||
Reference in New Issue
Block a user