mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix local map saving when joining a local server from the server tab
Disables local map saving for all local server types See: https://github.com/minetest/minetest/issues/2024
This commit is contained in:
parent
4d15d63134
commit
38561023b4
3 changed files with 55 additions and 35 deletions
|
@ -1923,7 +1923,6 @@ bool Game::createSingleplayerServer(const std::string map_dir,
|
|||
|
||||
try {
|
||||
bind_addr.Resolve(bind_str.c_str());
|
||||
*address = bind_str;
|
||||
} catch (ResolveError &e) {
|
||||
infostream << "Resolving bind address \"" << bind_str
|
||||
<< "\" failed: " << e.what()
|
||||
|
@ -2121,6 +2120,7 @@ bool Game::connectToServer(const std::string &playername,
|
|||
{
|
||||
*connect_ok = false; // Let's not be overly optimistic
|
||||
*aborted = false;
|
||||
bool local_server_mode = false;
|
||||
|
||||
showOverlayMessage("Resolving address...", 0, 15);
|
||||
|
||||
|
@ -2138,6 +2138,7 @@ bool Game::connectToServer(const std::string &playername,
|
|||
} else {
|
||||
connect_address.setAddress(127, 0, 0, 1);
|
||||
}
|
||||
local_server_mode = true;
|
||||
}
|
||||
} catch (ResolveError &e) {
|
||||
*error_message = L"Couldn't resolve address: " + narrow_to_wide(e.what());
|
||||
|
@ -2154,7 +2155,7 @@ bool Game::connectToServer(const std::string &playername,
|
|||
}
|
||||
|
||||
client = new Client(device,
|
||||
playername.c_str(), password, simple_singleplayer_mode,
|
||||
playername.c_str(), password,
|
||||
*draw_control, texture_src, shader_src,
|
||||
itemdef_manager, nodedef_manager, sound, eventmgr,
|
||||
connect_address.isIPv6());
|
||||
|
@ -2168,7 +2169,8 @@ bool Game::connectToServer(const std::string &playername,
|
|||
connect_address.print(&infostream);
|
||||
infostream << std::endl;
|
||||
|
||||
client->connect(connect_address);
|
||||
client->connect(connect_address, *address,
|
||||
simple_singleplayer_mode || local_server_mode);
|
||||
|
||||
/*
|
||||
Wait for server to accept connection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue