Skip to content

Commit

Permalink
Couple of fixes for Demo Record
Browse files Browse the repository at this point in the history
- It won't start if the level is not loaded
- Main menu will be hidden if it's shown
  • Loading branch information
Charsi82 authored and Xottab-DUTY committed Aug 10, 2018
1 parent eeeb1e7 commit 99fefca
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/xrGame/console_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,18 +376,21 @@ class CCC_ALifeSwitchFactor : public IConsole_Command
class CCC_DemoRecord : public IConsole_Command
{
public:
CCC_DemoRecord(LPCSTR N) : IConsole_Command(N){};
CCC_DemoRecord(LPCSTR N) : IConsole_Command(N) {}
virtual void Execute(LPCSTR args)
{
#ifndef DEBUG
// if (GameID() != eGameIDSingle)
//{
// Msg("For this game type Demo Record is disabled.");
// return;
//};
#endif
if (!g_pGameLevel) // level not loaded
{
Log("Demo Record is disabled when level is not loaded.");
return;
}

Console->Hide();

// close main menu if it is open
if (MainMenu()->IsActive())
MainMenu()->Activate(false);

LPSTR fn_;
STRCONCAT(fn_, args, ".xrdemo");
string_path fn;
Expand Down

0 comments on commit 99fefca

Please sign in to comment.