Restrict PC Brutal Peeps rooms to PC clients
This commit is contained in:
@@ -618,6 +618,13 @@ Lobby::JoinError Lobby::join_error_for_client(std::shared_ptr<Client> c, const s
|
|||||||
return JoinError::VERSION_CONFLICT;
|
return JoinError::VERSION_CONFLICT;
|
||||||
}
|
}
|
||||||
if (this->is_game()) {
|
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.
|
||||||
|
if ((this->brutal_peeps_tier >= 1) &&
|
||||||
|
this->version_is_allowed(Version::PC_V2) &&
|
||||||
|
(c->version() != Version::PC_V2)) {
|
||||||
|
return JoinError::VERSION_CONFLICT;
|
||||||
|
}
|
||||||
|
|
||||||
if (this->check_flag(Flag::QUEST_SELECTION_IN_PROGRESS)) {
|
if (this->check_flag(Flag::QUEST_SELECTION_IN_PROGRESS)) {
|
||||||
return JoinError::QUEST_SELECTION_IN_PROGRESS;
|
return JoinError::QUEST_SELECTION_IN_PROGRESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2120,6 +2120,12 @@ void send_game_menu_t(std::shared_ptr<Client> c, bool is_spectator_team_list, bo
|
|||||||
(client_has_debug || (l->check_flag(Lobby::Flag::IS_CLIENT_CUSTOMIZATION) == c->check_flag(Client::Flag::IS_CLIENT_CUSTOMIZATION))) &&
|
(client_has_debug || (l->check_flag(Lobby::Flag::IS_CLIENT_CUSTOMIZATION) == c->check_flag(Client::Flag::IS_CLIENT_CUSTOMIZATION))) &&
|
||||||
(l->check_flag(Lobby::Flag::IS_SPECTATOR_TEAM) == is_spectator_team_list) &&
|
(l->check_flag(Lobby::Flag::IS_SPECTATOR_TEAM) == is_spectator_team_list) &&
|
||||||
(!show_tournaments_only || l->tournament_match)) {
|
(!show_tournaments_only || l->tournament_match)) {
|
||||||
|
// Brutal Peeps PC rooms rely on PC-only BattleParam runtime patching, so don't show them to DC V2 clients.
|
||||||
|
if ((l->brutal_peeps_tier >= 1) &&
|
||||||
|
l->version_is_allowed(Version::PC_V2) &&
|
||||||
|
(c->version() != Version::PC_V2)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
games.emplace(l);
|
games.emplace(l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user