From de4d88ac3ba7ae31898cc018c67e1f267c9fb4a4 Mon Sep 17 00:00:00 2001 From: cubic <79692655+cubicgraphics@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:37:55 +0100 Subject: [PATCH 1/2] Fix map check --- BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs b/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs index 9d4e3d1..72e038b 100644 --- a/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs +++ b/BeatTogether.DedicatedServer.Kernel/Managers/LobbyManager.cs @@ -413,6 +413,7 @@ private void CancelCountdown() 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 = string.IsNullOrEmpty(p.MapHash); //If not passed, then we have difficulties, and if we have the diff we are looking for, then we can check it for requirements. From 42d3c2411184b6352f5c75f1cecda855ebbe3f16 Mon Sep 17 00:00:00 2001 From: cubic <79692655+cubicgraphics@users.noreply.github.com> Date: Mon, 6 May 2024 18:21:50 +0100 Subject: [PATCH 2/2] Update Player.cs Fix null beatmap difficulties --- BeatTogether.DedicatedServer.Kernel/Player.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeatTogether.DedicatedServer.Kernel/Player.cs b/BeatTogether.DedicatedServer.Kernel/Player.cs index 8105162..a9a8444 100644 --- a/BeatTogether.DedicatedServer.Kernel/Player.cs +++ b/BeatTogether.DedicatedServer.Kernel/Player.cs @@ -103,7 +103,7 @@ public void SetEntitlement(string levelId, EntitlementStatus entitlement) public bool UpdateEntitlement { get; set; } = false; public string MapHash { get; set; } = string.Empty; - public Dictionary BeatmapDifficultiesRequirements { get; set; } + public Dictionary BeatmapDifficultiesRequirements { get; set; } = new(); public long TicksAtLastSyncStateDelta { get; set; } = 0; //33ms gaps for 30/sec, 66ms gap for 15/sec public long TicksAtLastSyncState { get; set; } = 0;