1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00

Merge pull request #3974 from IvanSavenko/hotfix_compat

Relax vcmi version compatibility checks in lobby
This commit is contained in:
Ivan Savenko 2024-05-15 13:15:35 +03:00 committed by GitHub
commit eb6e42c780
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,11 @@ static const std::string getJoinRoomErrorMessage(const GlobalLobbyRoom & roomDes
if (gameStarted)
return "vcmi.lobby.preview.error.busy";
if (VCMI_VERSION_STRING != roomDescription.gameVersion)
CModVersion localVersion = CModVersion::fromString(VCMI_VERSION_STRING);
CModVersion hostVersion = CModVersion::fromString(roomDescription.gameVersion);
// 1.5.X can play with each other, but not with 1.X.Y
if (localVersion.major != hostVersion.major || localVersion.minor != hostVersion.minor)
return "vcmi.lobby.preview.error.version";
if (roomDescription.playerLimit == roomDescription.participants.size())