MCPcopy Create free account
hub / github.com/DFHack/dfhack / canTargetUnit

Function canTargetUnit

plugins/siege-engine.cpp:1341–1354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1339}
1340
1341static bool canTargetUnit(df::unit *unit)
1342{
1343 CHECK_NULL_POINTER(unit);
1344
1345 if (!Units::isActive(unit) ||
1346 unit->flags1.bits.caged ||
1347 unit->flags1.bits.left ||
1348 unit->flags1.bits.incoming ||
1349 unit->flags1.bits.hidden_in_ambush ||
1350 Units::isGhost(unit))
1351 return false;
1352
1353 return true;
1354}
1355
1356static void proposeUnitHits(EngineInfo *engine, std::vector<UnitPath::Hit> *hits, float bias)
1357{

Callers 1

proposeUnitHitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected