forked from Mirrorlandia_minetest/minetest
Fix unitialised variable occassionally being used
This commit is contained in:
parent
a555e2d9b0
commit
0ea843bbdb
@ -2116,6 +2116,9 @@ bool Game::connectToServer(const std::string &playername,
|
|||||||
const std::string &password, std::string *address, u16 port,
|
const std::string &password, std::string *address, u16 port,
|
||||||
bool *connect_ok, bool *aborted)
|
bool *connect_ok, bool *aborted)
|
||||||
{
|
{
|
||||||
|
*connect_ok = false; // Let's not be overly optimistic
|
||||||
|
*aborted = false;
|
||||||
|
|
||||||
showOverlayMessage("Resolving address...", 0, 15);
|
showOverlayMessage("Resolving address...", 0, 15);
|
||||||
|
|
||||||
Address connect_address(0, 0, 0, 0, port);
|
Address connect_address(0, 0, 0, 0, port);
|
||||||
@ -2158,14 +2161,12 @@ bool Game::connectToServer(const std::string &playername,
|
|||||||
|
|
||||||
gamedef = client; // Client acts as our GameDef
|
gamedef = client; // Client acts as our GameDef
|
||||||
|
|
||||||
|
|
||||||
infostream << "Connecting to server at ";
|
infostream << "Connecting to server at ";
|
||||||
connect_address.print(&infostream);
|
connect_address.print(&infostream);
|
||||||
infostream << std::endl;
|
infostream << std::endl;
|
||||||
|
|
||||||
client->connect(connect_address);
|
client->connect(connect_address);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Wait for server to accept connection
|
Wait for server to accept connection
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user