1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00

Update some missed variables

This commit is contained in:
Dean Herbert 2020-12-25 23:36:09 +09:00
parent 2d7f9bf290
commit e421b6d34e
2 changed files with 10 additions and 10 deletions

View File

@ -42,7 +42,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
Name = { Value = "Open" },
Status = { Value = new RoomStatusOpen() },
Category = { Value = RoomCategory.Multiplayer }
Category = { Value = RoomCategory.Realtime }
}) { MatchingFilter = true },
}
};

View File

@ -28,37 +28,37 @@ namespace osu.Game.Screens.Multi.Multiplayer
protected override void UpdatePollingRate(bool isIdle)
{
var playlistsManager = (MultiplayerRoomManager)RoomManager;
var multiplayerRoomManager = (MultiplayerRoomManager)RoomManager;
if (!this.IsCurrentScreen())
{
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
multiplayerRoomManager.TimeBetweenListingPolls.Value = 0;
multiplayerRoomManager.TimeBetweenSelectionPolls.Value = 0;
}
else
{
switch (CurrentSubScreen)
{
case LoungeSubScreen _:
playlistsManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
playlistsManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
multiplayerRoomManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
multiplayerRoomManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
break;
// Don't poll inside the match or anywhere else.
default:
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
multiplayerRoomManager.TimeBetweenListingPolls.Value = 0;
multiplayerRoomManager.TimeBetweenSelectionPolls.Value = 0;
break;
}
}
Logger.Log($"Polling adjusted (listing: {playlistsManager.TimeBetweenListingPolls.Value}, selection: {playlistsManager.TimeBetweenSelectionPolls.Value})");
Logger.Log($"Polling adjusted (listing: {multiplayerRoomManager.TimeBetweenListingPolls.Value}, selection: {multiplayerRoomManager.TimeBetweenSelectionPolls.Value})");
}
protected override Room CreateNewRoom()
{
var room = new Room { Name = { Value = $"{API.LocalUser}'s awesome room" } };
room.Category.Value = RoomCategory.Multiplayer;
room.Category.Value = RoomCategory.Realtime;
return room;
}