| 516 | extern bool RESET_SECTORS_HACK; |
| 517 | |
| 518 | void CGamePersistent::OnFrame() |
| 519 | { |
| 520 | if (g_tutorial2) |
| 521 | { |
| 522 | g_tutorial2->Destroy(); |
| 523 | xr_delete(g_tutorial2); |
| 524 | } |
| 525 | |
| 526 | if (g_tutorial && !g_tutorial->IsActive()) |
| 527 | { |
| 528 | xr_delete(g_tutorial); |
| 529 | } |
| 530 | |
| 531 | #ifdef DEBUG |
| 532 | ++m_frame_counter; |
| 533 | #endif |
| 534 | if (!m_intro_event.empty() && !load_screen_renderer.b_registered) |
| 535 | m_intro_event(); |
| 536 | |
| 537 | if (Device.dwPrecacheFrame == 0 && load_screen_renderer.b_registered && !GameAutopaused) |
| 538 | { |
| 539 | if (psActorFlags.test(AF_KEYPRESS_ON_START)) |
| 540 | { |
| 541 | Device.Pause(TRUE, TRUE, TRUE, "AUTOPAUSE_START"); |
| 542 | pApp->LoadForceFinish(); |
| 543 | LoadTitle("st_press_any_key"); |
| 544 | GameAutopaused = true; |
| 545 | } |
| 546 | else |
| 547 | { |
| 548 | load_screen_renderer.stop(); |
| 549 | } |
| 550 | |
| 551 | RESET_SECTORS_HACK = true; |
| 552 | |
| 553 | Discord.Update(CStringTable().translate(Level().name()).c_str(), Level().name().c_str()); |
| 554 | } |
| 555 | |
| 556 | if (!m_pMainMenu->IsActive()) |
| 557 | m_pMainMenu->DestroyInternal(false); |
| 558 | |
| 559 | if (!g_pGameLevel) |
| 560 | return; |
| 561 | if (!g_pGameLevel->bReady) |
| 562 | return; |
| 563 | |
| 564 | if (Device.Paused()) |
| 565 | { |
| 566 | #ifndef MASTER_GOLD |
| 567 | if (Level().CurrentViewEntity()) |
| 568 | { |
| 569 | if (!g_actor || (g_actor->ID() != Level().CurrentViewEntity()->ID())) |
| 570 | { |
| 571 | CCustomMonster* custom_monster = smart_cast<CCustomMonster*>(Level().CurrentViewEntity()); |
| 572 | if (custom_monster) // can be spectator in multiplayer |
| 573 | custom_monster->UpdateCamera(); |
| 574 | } |
| 575 | else |
nothing calls this directly
no test coverage detected