Allow 256 NewGRFs in multiplayer

Add extended network format for server info
Add general UDP packet fragmentation system
Fix map dimensions >= 64k
Increase length of server revision string
Maintain backwards compatibility with trunk for advertisement/server listing
This commit is contained in:
Jonathan G Rennison
2018-05-12 09:11:41 +01:00
parent 9b42ae954c
commit 6342099c4d
16 changed files with 382 additions and 78 deletions

View File

@@ -1124,9 +1124,9 @@ void NetworkShutDown()
* Checks whether the given version string is compatible with our version.
* @param other the version string to compare to
*/
bool IsNetworkCompatibleVersion(const char *other)
bool IsNetworkCompatibleVersion(const char *other, bool extended)
{
return strncmp(_openttd_revision, other, NETWORK_REVISION_LENGTH - 1) == 0;
return strncmp(_openttd_revision, other, (extended ? NETWORK_LONG_REVISION_LENGTH : NETWORK_REVISION_LENGTH) - 1) == 0;
}
#endif /* ENABLE_NETWORK */