1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

allow joining of servers in server list window

This commit is contained in:
IntelOrca
2015-08-16 16:36:57 +01:00
parent 43489db6a2
commit 094cc19411
8 changed files with 205 additions and 114 deletions

View File

@@ -26,6 +26,7 @@
#include "network.h"
extern "C" {
#include "../addresses.h"
#include "../config.h"
#include "../game.h"
#include "../interface/chat.h"
#include "../interface/window.h"
@@ -301,7 +302,7 @@ bool Network::BeginClient(const char* host, unsigned short port)
server_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (server_socket == INVALID_SOCKET) {
log_error("Unable to create socket.");
return 0;
return false;
}
SOCKADDR_IN server_address;
@@ -326,7 +327,7 @@ bool Network::BeginClient(const char* host, unsigned short port)
mode = NETWORK_MODE_CLIENT;
Client_Send_AUTH(OPENRCT2_VERSION, "Player", "");
Client_Send_AUTH(OPENRCT2_VERSION, gConfigNetwork.player_name, "");
return true;
}