| 435 | public: |
| 436 | CCC_DemoRecord(LPCSTR N) : IConsole_Command(N) {} |
| 437 | virtual void Execute(LPCSTR args) |
| 438 | { |
| 439 | if (!g_pGameLevel) |
| 440 | { // level not loaded |
| 441 | Log("Demo Record is disabled when level is not loaded."); |
| 442 | return; |
| 443 | } |
| 444 | |
| 445 | Console->Hide(); |
| 446 | |
| 447 | if (MainMenu()->IsActive()) |
| 448 | MainMenu()->Activate(false); |
| 449 | |
| 450 | string_path fn_; |
| 451 | strconcat(sizeof(fn_), fn_, args, ".xrdemo"); |
| 452 | string_path fn; |
| 453 | FS.update_path(fn, "$game_saves$", fn_); |
| 454 | |
| 455 | g_pGameLevel->Cameras().AddCamEffector(xr_new<CDemoRecord>(fn)); |
| 456 | } |
| 457 | }; |
| 458 | |
| 459 | class CCC_DemoPlay : public IConsole_Command |
nothing calls this directly
no test coverage detected