| 643 | #include "xrServer.h" |
| 644 | |
| 645 | void CGamePersistent::OnEvent(EVENT E, u64 P1, u64 P2) |
| 646 | { |
| 647 | if (E == eQuickLoad) |
| 648 | { |
| 649 | if (Device.Paused()) |
| 650 | Device.Pause(FALSE, TRUE, TRUE, "eQuickLoad"); |
| 651 | |
| 652 | LPSTR saved_name = (LPSTR)(P1); |
| 653 | |
| 654 | Level().remove_objects(); |
| 655 | game_sv_Single* game = smart_cast<game_sv_Single*>(Level().Server->game); |
| 656 | R_ASSERT(game); |
| 657 | game->restart_simulator(saved_name); |
| 658 | xr_free(saved_name); |
| 659 | return; |
| 660 | } |
| 661 | else if (E == eDemoStart) |
| 662 | { |
| 663 | string256 cmd; |
| 664 | LPCSTR demo = LPCSTR(P1); |
| 665 | sprintf_s(cmd, "demo_play %s", demo); |
| 666 | Console->Execute(cmd); |
| 667 | xr_free(demo); |
| 668 | uTime2Change = Device.TimerAsync() + u32(P2) * 1000; |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | void CGamePersistent::Statistics(CGameFont* F) |
| 673 | { |
nothing calls this directly
no test coverage detected