diff --git a/app/Models/Multiplayer/Room.php b/app/Models/Multiplayer/Room.php index 8dcf6d088ed..19e9d2c7d8b 100644 --- a/app/Models/Multiplayer/Room.php +++ b/app/Models/Multiplayer/Room.php @@ -763,11 +763,7 @@ private function assertValidStartPlay(User $user, PlaylistItem $playlistItem, ar if ($playlistItem->freestyle) { // assert the beatmap_id is part of playlist item's beatmapset - $beatmapsetIdCount = Beatmap - ::whereKey([$playlistItem->beatmap_id, $params['beatmap_id']]) - ->distinct('beatmapset_id') - ->count(); - if ($beatmapsetIdCount !== 1) { + if ($playlistItem->beatmap->beatmapset_id !== Beatmap::find($params['beatmap_id'])?->getKey()) { throw new InvariantException('Specified beatmap_id is not allowed'); } }