Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpObstruction.cpp
Show First 20 Lines • Show All 631 Lines • ▼ Show 20 Lines | virtual std::vector<entity_id_t> GetEntitiesByFlags(flags_t flags) const | ||||
// Note that, since the control group for each entity defaults to the entity's ID, this is typically | // Note that, since the control group for each entity defaults to the entity's ID, this is typically | ||||
// equivalent to only ignoring the entity's own shape and other shapes that don't match the filter. | // equivalent to only ignoring the entity's own shape and other shapes that don't match the filter. | ||||
SkipControlGroupsRequireFlagObstructionFilter filter(false, m_ControlGroup, m_ControlGroup2, flags); | SkipControlGroupsRequireFlagObstructionFilter filter(false, m_ControlGroup, m_ControlGroup2, flags); | ||||
ICmpObstructionManager::ObstructionSquare square; | ICmpObstructionManager::ObstructionSquare square; | ||||
if (!GetObstructionSquare(square)) | if (!GetObstructionSquare(square)) | ||||
return ret; // error | return ret; // error | ||||
cmpObstructionManager->GetUnitsOnObstruction(square, ret, filter, false); | cmpObstructionManager->GetUnitsOnObstruction(square, ret, filter); | ||||
cmpObstructionManager->GetStaticObstructionsOnObstruction(square, ret, filter); | cmpObstructionManager->GetStaticObstructionsOnObstruction(square, ret, filter); | ||||
return ret; | return ret; | ||||
} | } | ||||
virtual std::vector<entity_id_t> GetEntitiesBlockingConstruction() const | virtual std::vector<entity_id_t> GetEntitiesBlockingConstruction() const | ||||
{ | { | ||||
return GetEntitiesByFlags(ICmpObstructionManager::FLAG_BLOCK_CONSTRUCTION); | return GetEntitiesByFlags(ICmpObstructionManager::FLAG_BLOCK_CONSTRUCTION); | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator