Reset ui_demo_* dvars, when executing uiScript deleteDemo.

This commit is contained in:
sr0 2016-01-11 11:07:25 +01:00
parent 99f5d2cd81
commit 1c8c23e008

View File

@ -221,6 +221,14 @@ namespace Components
FileSystem::DeleteFile("demos", info.Name + ".dm_13");
FileSystem::DeleteFile("demos", info.Name + ".dm_13.json");
// Reset our ui_demo_* dvars here, because the theater menu needs it.
Command::Execute("reset ui_demo_mapname", true);
Command::Execute("reset ui_demo_mapname_localized", true);
Command::Execute("reset ui_demo_gametype", true);
Command::Execute("reset ui_demo_author", true);
Command::Execute("reset ui_demo_length", true);
Command::Execute("reset ui_demo_date", true);
// Reload demos
Theatre::LoadDemos();
}