Use com_restart in updater

This commit is contained in:
Federico Cecchetto 2022-07-14 04:10:28 +02:00
parent f1563dc0e6
commit 0e8cecd0c3
2 changed files with 16 additions and 2 deletions

View File

@ -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();
});
}
};
}

View File

@ -92,7 +92,7 @@ function startupdatedownload(popup, autoclose)
end
})
else
Engine.Exec("lui_restart")
Engine.Exec("com_restart")
end
if (autoclose) then