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
376
376
class CCC_DemoRecord : public IConsole_Command
377
377
{
378
378
public:
379
- CCC_DemoRecord (LPCSTR N) : IConsole_Command(N){};
379
+ CCC_DemoRecord (LPCSTR N) : IConsole_Command(N) {}
380
380
virtual void Execute (LPCSTR args)
381
381
{
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
+
389
388
Console->Hide ();
390
389
390
+ // close main menu if it is open
391
+ if (MainMenu ()->IsActive ())
392
+ MainMenu ()->Activate (false );
393
+
391
394
LPSTR fn_;
392
395
STRCONCAT (fn_, args, " .xrdemo" );
393
396
string_path fn;
You can’t perform that action at this time.
0 commit comments