1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Automatically migrate client mod storage (#11960)

This commit is contained in:
Jude Melton-Houghton 2022-01-27 16:24:30 -05:00 committed by GitHub
parent 47735c273c
commit fc161e757c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 5 deletions

View file

@ -1466,11 +1466,18 @@ bool Game::connectToServer(const GameStartData &start_data,
return false;
}
client = new Client(start_data.name.c_str(),
start_data.password, start_data.address,
*draw_control, texture_src, shader_src,
itemdef_manager, nodedef_manager, sound, eventmgr,
m_rendering_engine, connect_address.isIPv6(), m_game_ui.get());
try {
client = new Client(start_data.name.c_str(),
start_data.password, start_data.address,
*draw_control, texture_src, shader_src,
itemdef_manager, nodedef_manager, sound, eventmgr,
m_rendering_engine, connect_address.isIPv6(), m_game_ui.get());
client->migrateModStorage();
} catch (const BaseException &e) {
*error_message = fmtgettext("Error creating client: %s", e.what());
errorstream << *error_message << std::endl;
return false;
}
client->m_simple_singleplayer_mode = simple_singleplayer_mode;