Restrict Brutal Peeps rooms to matching client versions

This commit is contained in:
2026-06-07 15:54:21 -04:00
parent 7d609b6a40
commit 672a6575a7
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -618,10 +618,11 @@ Lobby::JoinError Lobby::join_error_for_client(std::shared_ptr<Client> c, const s
return JoinError::VERSION_CONFLICT;
}
if (this->is_game()) {
// Brutal Peeps PC rooms rely on PC-only BattleParam runtime patching, so don't allow DC V2 clients to join them.
// Brutal Peeps rooms rely on version-specific BattleParam patching.
// BB Brutal rooms are BB-only; PC Brutal rooms are PC V2-only.
if ((this->brutal_peeps_tier >= 1) &&
this->version_is_allowed(Version::PC_V2) &&
(c->version() != Version::PC_V2)) {
((this->version_is_allowed(Version::BB_V4) && (c->version() != Version::BB_V4)) ||
(this->version_is_allowed(Version::PC_V2) && (c->version() != Version::PC_V2)))) {
return JoinError::VERSION_CONFLICT;
}