From 1c8c23e008859924746e47c15d4279c473427c7e Mon Sep 17 00:00:00 2001 From: sr0 Date: Mon, 11 Jan 2016 11:07:25 +0100 Subject: [PATCH] Reset ui_demo_* dvars, when executing uiScript deleteDemo. --- src/Components/Modules/Theatre.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Components/Modules/Theatre.cpp b/src/Components/Modules/Theatre.cpp index 350086b7..473c600c 100644 --- a/src/Components/Modules/Theatre.cpp +++ b/src/Components/Modules/Theatre.cpp @@ -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(); }