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:
parent
71de7ce0a3
commit
a4ca8d2998
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user