| 1560 | } |
| 1561 | |
| 1562 | void DisplayCampaignLoad::OnSimulate(EntityAI* vehicle) |
| 1563 | { |
| 1564 | if (InputSubsystem::Instance().CheatActivated() == CheatUnlockCampaign) |
| 1565 | { |
| 1566 | OnCampaignCheat(); |
| 1567 | InputSubsystem::Instance().CheatServed(); |
| 1568 | } |
| 1569 | bool show = true; |
| 1570 | ControlObjectContainerAnim* book = dynamic_cast<ControlObjectContainerAnim*>(GetCtrl(IDC_CAMPAIGN_BOOK)); |
| 1571 | if (book) |
| 1572 | { |
| 1573 | show = book->GetPhase() > 0.75; |
| 1574 | } |
| 1575 | IControl* ctrl = GetCtrl(IDC_CAMPAIGN_DESCRIPTION); |
| 1576 | if (ctrl) |
| 1577 | { |
| 1578 | ctrl->ShowCtrl(show); |
| 1579 | } |
| 1580 | ctrl = GetCtrl(IDC_CAMPAIGN_MISSION); |
| 1581 | if (ctrl) |
| 1582 | { |
| 1583 | ctrl->ShowCtrl(show); |
| 1584 | } |
| 1585 | |
| 1586 | if (show && !_showStatistics) |
| 1587 | { |
| 1588 | _showStatistics = true; |
| 1589 | OnChangeMission(); |
| 1590 | } |
| 1591 | else if (!show && _showStatistics) |
| 1592 | { |
| 1593 | _showStatistics = false; |
| 1594 | ShowStatistics(false); |
| 1595 | } |
| 1596 | |
| 1597 | Display::OnSimulate(vehicle); |
| 1598 | } |
| 1599 | |
| 1600 | // Resolve a friendly title for a mission inside a campaign — opens the |
| 1601 | // mission's mission.sqm via LoadLocalizedMissionBriefingName and falls |
nothing calls this directly
no test coverage detected