Users now automatically connect to home server

This commit is contained in:
2016-12-03 22:27:43 +11:00
parent ec7908b010
commit ed5bcc9706
2 changed files with 10 additions and 7 deletions
+9 -7
View File
@@ -290,14 +290,16 @@ void LobbyMenu::HandleLoginRejection(TextPacket* const argPacket) {
//-------------------------
void LobbyMenu::SendBroadcastRequest() {
//broadcast to the network, or a specific server
ClientPacket packet;
packet.type = SerialPacketType::BROADCAST_REQUEST;
network.SendTo(config["server.host"].c_str(), config.Int("server.port"), &packet);
//broadcast to the home server, and to the LAN
ClientPacket packet;
//reset the server list
serverVector.clear();
selection = nullptr;
packet.type = SerialPacketType::BROADCAST_REQUEST;
network.SendTo(config["server.home"].c_str(), config.Int("server.port"), &packet);
network.SendTo(config["server.host"].c_str(), config.Int("server.port"), &packet);
//reset the server list
serverVector.clear();
selection = nullptr;
}
void LobbyMenu::SendJoinRequest() {
+1
View File
@@ -2,6 +2,7 @@
#TODO: (9) split this file in two, one for each program
#server specific settings
server.home = island.krgamestudios.com
server.host = 255.255.255.255
server.port = 21795
server.name = local