| 70 | } |
| 71 | |
| 72 | BWAPI::Unit UnitWrap::FindNewAttackTarget() const |
| 73 | { |
| 74 | UnitType t = pUnit->getType(); |
| 75 | |
| 76 | Unit pTarg = pUnit->getClosestUnit( IsEnemy && |
| 77 | [this](Unit u){ return pUnit->isInWeaponRange(u);} && |
| 78 | IsVisible && |
| 79 | !IsInvincible, std::max(t.seekRange(),t.sightRange())*32 ); |
| 80 | // Should be greatly expanded, but for now something simple |
| 81 | return pTarg; |
| 82 | } |
nothing calls this directly
no test coverage detected