Merge pull request #4524 from GregorR/netplay-direct-host-set-is-client

We're in client mode if either server OR direct_host is set
This commit is contained in:
Twinaphex 2017-01-29 04:46:42 +01:00 committed by GitHub
commit 38329fbb26

View File

@ -422,7 +422,7 @@ netplay_t *netplay_new(void *direct_host, const char *server, uint16_t port,
netplay->cbs = *cb;
netplay->connected_players = 0;
netplay->player_max = 1;
netplay->is_server = server == NULL;
netplay->is_server = (direct_host == NULL && server == NULL);
netplay->nat_traversal = netplay->is_server ? nat_traversal : false;
netplay->stateless_mode = stateless_mode;
netplay->check_frames = check_frames;