MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Execute

Method Execute

ogsr_engine/xrGame/console_commands.cpp:463–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461public:
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
487bool valid_file_name(LPCSTR file_name)

Callers

nothing calls this directly

Calls 4

MsgFunction · 0.85
AddCamEffectorMethod · 0.80
HideMethod · 0.45
update_pathMethod · 0.45

Tested by

no test coverage detected