* Switches to Standard mode (minimum weapon range). * @param action Pointer to an action. */
| 1351 | * @param action Pointer to an action. |
| 1352 | */ |
| 1353 | void DogfightState::btnStandardClick(Action *) |
| 1354 | { |
| 1355 | if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff) |
| 1356 | { |
| 1357 | _end = false; |
| 1358 | setStatus("STR_STANDARD_ATTACK"); |
| 1359 | if (_craft->getRules()->getWeapons() > 0 && _craft->getWeapons()->at(0) != 0) |
| 1360 | { |
| 1361 | _w1Timer->setInterval(_craft->getWeapons()->at(0)->getRules()->getStandardReload() * _timeScale); |
| 1362 | } |
| 1363 | if (_craft->getRules()->getWeapons() > 1 && _craft->getWeapons()->at(1) != 0) |
| 1364 | { |
| 1365 | _w2Timer->setInterval(_craft->getWeapons()->at(1)->getRules()->getStandardReload() * _timeScale); |
| 1366 | } |
| 1367 | maximumDistance(); |
| 1368 | _ufoEscapeTimer->start(); |
| 1369 | } |
| 1370 | } |
| 1371 | |
| 1372 | /** |
| 1373 | * Switches to Aggressive mode (minimum range). |
nothing calls this directly
no test coverage detected