| 461 | public: |
| 462 | CCC_DemoPlay(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = TRUE; }; |
| 463 | virtual void Execute(LPCSTR args) |
| 464 | { |
| 465 | if (0 == g_pGameLevel) |
| 466 | { |
| 467 | Msg("! There are no level(s) started"); |
| 468 | } |
| 469 | else |
| 470 | { |
| 471 | Console->Hide(); |
| 472 | string_path fn; |
| 473 | u32 loops = 0; |
| 474 | LPSTR comma = strchr(const_cast<LPSTR>(args), ','); |
| 475 | if (comma) |
| 476 | { |
| 477 | loops = atoi(comma + 1); |
| 478 | *comma = 0; //. :) |
| 479 | } |
| 480 | strconcat(sizeof(fn), fn, args, ".xrdemo"); |
| 481 | FS.update_path(fn, "$game_saves$", fn); |
| 482 | g_pGameLevel->Cameras().AddCamEffector(xr_new<CDemoPlay>(fn, 1.0f, loops)); |
| 483 | } |
| 484 | } |
| 485 | }; |
| 486 | |
| 487 | bool valid_file_name(LPCSTR file_name) |
nothing calls this directly
no test coverage detected