1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

uuid check

This commit is contained in:
nordsoft
2022-10-04 20:54:40 +04:00
parent 83f4a5b561
commit 930f03e812
3 changed files with 50 additions and 42 deletions

View File

@@ -120,11 +120,6 @@ CServerHandler::CServerHandler()
uuid = boost::uuids::to_string(boost::uuids::random_generator()());
applier = std::make_shared<CApplier<CBaseForLobbyApply>>();
registerTypesLobbyPacks(*applier);
if(settings["remoteSession"].Bool())
{
uuid = settings["uuid"].String();
}
}
void CServerHandler::resetStateForLobby(const StartInfo::EMode mode, const std::vector<std::string> * names)
@@ -669,6 +664,7 @@ void CServerHandler::restoreLastSession()
{
auto loadSession = [this]()
{
uuid = settings["server"]["uuid"].String();
for(auto & name : settings["server"]["names"].Vector())
myNames.push_back(name.String());
resetStateForLobby(StartInfo::LOAD_GAME, &myNames);