| 261 | |
| 262 | |
| 263 | void UnitWrap::RunMilitaryController() |
| 264 | { |
| 265 | // Run bunker tasks |
| 266 | if ( (pUnit->getType() == UnitTypes::Terran_Marine || pUnit->getType() == UnitTypes::Terran_Firebat) && |
| 267 | TaskBunkerDefender() ) |
| 268 | return; |
| 269 | |
| 270 | // Run spellcaster tasks |
| 271 | if ( TaskSpellcaster(false) ) |
| 272 | return; |
| 273 | |
| 274 | // Run aggressive unit tasks (large) |
| 275 | if ( TaskAggression() ) |
| 276 | return; |
| 277 | |
| 278 | // @TODO |
| 279 | Region targetRgn = nullptr; |
| 280 | // Get targetRgn from captain destination or slowest unit in group |
| 281 | |
| 282 | if ( pUnit->getRegion() == targetRgn ) |
| 283 | pUnit->holdPosition(); |
| 284 | else |
| 285 | pUnit->attack(targetRgn->getCenter()); |
| 286 | } |
nothing calls this directly
no test coverage detected