| 1533 | } |
| 1534 | |
| 1535 | void DisplayMap::OnDraw(EntityAI* vehicle, float alpha) |
| 1536 | { |
| 1537 | // Compass orientation |
| 1538 | Camera* camera = GScene->GetCamera(); |
| 1539 | if (camera) |
| 1540 | { |
| 1541 | Vector3Val dir = camera->Direction(); |
| 1542 | _compass->SetOrient(Vector3(dir.X(), dir.Z(), dir.Y()), Vector3(0, 0, -1)); |
| 1543 | } |
| 1544 | // Radio slots |
| 1545 | SetRadioText(); |
| 1546 | // Show / hide mission name |
| 1547 | _name->ShowCtrl(_briefing->ActiveBookmark() >= 0); |
| 1548 | // GPS position |
| 1549 | Object* cameraOn = GWorld->CameraOn(); |
| 1550 | if (cameraOn) |
| 1551 | { |
| 1552 | char buffer[16]; |
| 1553 | PositionToAA11(cameraOn->Position(), buffer); |
| 1554 | _gpsCtrl->SetText(buffer); |
| 1555 | } |
| 1556 | else |
| 1557 | { |
| 1558 | _gpsCtrl->SetText("----"); |
| 1559 | } |
| 1560 | |
| 1561 | // tooltip |
| 1562 | RString tooltip; |
| 1563 | const HTMLField* field = _briefing->GetActiveField(); |
| 1564 | if (_currentUnit >= 0 && field) |
| 1565 | { |
| 1566 | tooltip = GetTooltip(_weaponsInfo._weapons[_currentUnit], field->href); |
| 1567 | } |
| 1568 | _briefing->SetTooltip(tooltip); |
| 1569 | |
| 1570 | // FIX: do not show notepad for dead units (not for unassigned JIP players) |
| 1571 | Person* player = GWorld->GetRealPlayer(); |
| 1572 | AIUnit* playerUnit = player ? player->Brain() : nullptr; |
| 1573 | if (playerUnit && playerUnit->GetLifeState() == AIUnit::LSDead) |
| 1574 | { |
| 1575 | ShowNotepad(false); |
| 1576 | } |
| 1577 | |
| 1578 | Display::OnDraw(vehicle, alpha); |
| 1579 | } |
| 1580 | |
| 1581 | void DisplayMap::OnSimulate(EntityAI* vehicle) |
| 1582 | { |
nothing calls this directly
no test coverage detected