mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-28 08:59:09 +00:00
(svn r4268) - Delete the network-copy of the Patches struct as it is not needed anymore. All relevant patch-settings that are changed by a network-game are those that are saved with a savegame, so these are not affected for loaded games (since Patches are saved with them). Also there is a distinction between in-game patch settings and default patch settings and this is not affected in MP. Thus this temp copy can be removed.
This commit is contained in:
10
network.c
10
network.c
@@ -40,10 +40,6 @@ struct Library *SocketBase = NULL;
|
|||||||
// The listen socket for the server
|
// The listen socket for the server
|
||||||
static SOCKET _listensocket;
|
static SOCKET _listensocket;
|
||||||
|
|
||||||
// Network copy of patches, so the patches of a client are not fucked up
|
|
||||||
// after he joined a server
|
|
||||||
static Patches network_tmp_patches;
|
|
||||||
|
|
||||||
// The amount of clients connected
|
// The amount of clients connected
|
||||||
static byte _network_clients_connected = 0;
|
static byte _network_clients_connected = 0;
|
||||||
// The index counter for new clients (is never decreased)
|
// The index counter for new clients (is never decreased)
|
||||||
@@ -651,8 +647,6 @@ static bool NetworkConnect(const char *hostname, int port)
|
|||||||
|
|
||||||
ShowJoinStatusWindow();
|
ShowJoinStatusWindow();
|
||||||
|
|
||||||
memcpy(&network_tmp_patches, &_patches, sizeof(_patches));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1087,10 +1081,6 @@ void NetworkDisconnect(void)
|
|||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_networking && !_network_server) {
|
|
||||||
memcpy(&_patches, &network_tmp_patches, sizeof(_patches));
|
|
||||||
}
|
|
||||||
|
|
||||||
_networking = false;
|
_networking = false;
|
||||||
_network_server = false;
|
_network_server = false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user