| 1449 | } |
| 1450 | else |
| 1451 | { |
| 1452 | RefreshStrategicPlan(); |
| 1453 | } |
| 1454 | } |
| 1455 | |
| 1456 | void AIUnit::ExposureChanged(int x, int z, float optimistic, float pessimistic) |
| 1457 | { |
| 1458 | float exposure = IsHoldingFire() ? fabs(pessimistic) : fabs(optimistic); |
| 1459 | if (exposure < VALID_EXPOSURE_CHANGE) |
| 1460 | { |
| 1461 | return; |
| 1462 | } |
| 1463 | |
| 1464 | if (_planner->IsOnPath(x, z, _planner->FindBestIndex(Position()), _planner->GetPlanSize() - 1)) |
| 1465 | { |
| 1466 | _exposureChange += exposure; |
no test coverage detected