| 1339 | } |
| 1340 | |
| 1341 | static 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 | |
| 1356 | static void proposeUnitHits(EngineInfo *engine, std::vector<UnitPath::Hit> *hits, float bias) |
| 1357 | { |