File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -376,18 +376,21 @@ class CCC_ALifeSwitchFactor : public IConsole_Command
376376class CCC_DemoRecord : public IConsole_Command
377377{
378378public:
379- CCC_DemoRecord (LPCSTR N) : IConsole_Command(N){};
379+ CCC_DemoRecord (LPCSTR N) : IConsole_Command(N) {}
380380 virtual void Execute (LPCSTR args)
381381 {
382- #ifndef DEBUG
383- // if (GameID() != eGameIDSingle)
384- // {
385- // Msg("For this game type Demo Record is disabled.");
386- // return;
387- // };
388- #endif
382+ if (!g_pGameLevel) // level not loaded
383+ {
384+ Log (" Demo Record is disabled when level is not loaded." );
385+ return ;
386+ }
387+
389388 Console->Hide ();
390389
390+ // close main menu if it is open
391+ if (MainMenu ()->IsActive ())
392+ MainMenu ()->Activate (false );
393+
391394 LPSTR fn_;
392395 STRCONCAT (fn_, args, " .xrdemo" );
393396 string_path fn;
You can’t perform that action at this time.
0 commit comments