diff --git a/src/client/component/mods.cpp b/src/client/component/mods.cpp index c427229b..f8bf4af2 100644 --- a/src/client/component/mods.cpp +++ b/src/client/component/mods.cpp @@ -43,8 +43,12 @@ namespace mods scheduler::once([]() { release_assets = true; + const auto _0 = gsl::finally([]() + { + release_assets = false; + }); + game::Com_Shutdown(""); - release_assets = false; }, scheduler::pipeline::main); } } @@ -110,6 +114,16 @@ namespace mods mod_path.clear(); restart(); }); + + command::add("com_restart", []() + { + if (!game::Com_InFrontend()) + { + return; + } + + restart(); + }); } }; } diff --git a/src/client/resources/ui_scripts/updater.lua b/src/client/resources/ui_scripts/updater.lua index 5d1f1e35..04173efe 100644 --- a/src/client/resources/ui_scripts/updater.lua +++ b/src/client/resources/ui_scripts/updater.lua @@ -92,7 +92,7 @@ function startupdatedownload(popup, autoclose) end }) else - Engine.Exec("lui_restart") + Engine.Exec("com_restart") end if (autoclose) then