From 9eebd2c98edcbd187c52965cf04e668926156001 Mon Sep 17 00:00:00 2001 From: cubic Date: Thu, 9 May 2024 00:39:17 +0100 Subject: [PATCH] Fix null check issue --- BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs b/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs index e6fe7c9..11552b0 100644 --- a/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs +++ b/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs @@ -420,7 +420,7 @@ private bool PlayerMapCheck(IPlayer p) { if(p.BeatmapIdentifier == null) return false; //If no map hash then treat as base game map for compat reasons and while waiting for a packet - var Passed = p.SelectedBeatmapPacket != null && string.IsNullOrEmpty(p.SelectedBeatmapPacket.levelHash); + var Passed = p.SelectedBeatmapPacket != null && !string.IsNullOrEmpty(p.SelectedBeatmapPacket.levelHash); //If not passed, then we have difficulties, and if we have the diff we are looking for, then we can check it for requirements. if (!Passed && p.SelectedBeatmapPacket!.requirements.TryGetValue((uint)p.BeatmapIdentifier!.Difficulty, out string[]? Requirements)) Passed = !(!_configuration.AllowChroma && Requirements.Contains("Chroma")) || !(!_configuration.AllowMappingExtensions && Requirements.Contains("Mapping Extensions")) || !(!_configuration.AllowNoodleExtensions && Requirements.Contains("Noodle Extensions"));