From a4ca8d2998dc9fa222aceeb09ae90bf013bdf542 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 8 Dec 2020 16:44:47 +0900 Subject: [PATCH] Ensure multiplayer rooms are instantiated with a room ID --- osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs b/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs index e70e12c89e..8a88d8fc90 100644 --- a/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs +++ b/osu.Game/Online/RealtimeMultiplayer/MultiplayerRoom.cs @@ -17,7 +17,7 @@ namespace osu.Game.Online.RealtimeMultiplayer /// /// The ID of the room, used for database persistence. /// - public long RoomID { get; set; } + public readonly long RoomID; /// /// The current state of the room (ie. whether it is in progress or otherwise). @@ -41,6 +41,11 @@ namespace osu.Game.Online.RealtimeMultiplayer private object writeLock = new object(); + public MultiplayerRoom(in long roomId) + { + RoomID = roomId; + } + /// /// Perform an update on this room in a thread-safe manner. ///