1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Ensure multiplayer rooms are instantiated with a room ID

This commit is contained in:
Dean Herbert 2020-12-08 16:44:47 +09:00
parent 71de7ce0a3
commit a4ca8d2998

View File

@ -17,7 +17,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
/// <summary>
/// The ID of the room, used for database persistence.
/// </summary>
public long RoomID { get; set; }
public readonly long RoomID;
/// <summary>
/// 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;
}
/// <summary>
/// Perform an update on this room in a thread-safe manner.
/// </summary>