mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 18:12:56 +08:00
Update some missed variables
This commit is contained in:
parent
2d7f9bf290
commit
e421b6d34e
@ -42,7 +42,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
Name = { Value = "Open" },
|
Name = { Value = "Open" },
|
||||||
Status = { Value = new RoomStatusOpen() },
|
Status = { Value = new RoomStatusOpen() },
|
||||||
Category = { Value = RoomCategory.Multiplayer }
|
Category = { Value = RoomCategory.Realtime }
|
||||||
}) { MatchingFilter = true },
|
}) { MatchingFilter = true },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -28,37 +28,37 @@ namespace osu.Game.Screens.Multi.Multiplayer
|
|||||||
|
|
||||||
protected override void UpdatePollingRate(bool isIdle)
|
protected override void UpdatePollingRate(bool isIdle)
|
||||||
{
|
{
|
||||||
var playlistsManager = (MultiplayerRoomManager)RoomManager;
|
var multiplayerRoomManager = (MultiplayerRoomManager)RoomManager;
|
||||||
|
|
||||||
if (!this.IsCurrentScreen())
|
if (!this.IsCurrentScreen())
|
||||||
{
|
{
|
||||||
playlistsManager.TimeBetweenListingPolls.Value = 0;
|
multiplayerRoomManager.TimeBetweenListingPolls.Value = 0;
|
||||||
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
|
multiplayerRoomManager.TimeBetweenSelectionPolls.Value = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (CurrentSubScreen)
|
switch (CurrentSubScreen)
|
||||||
{
|
{
|
||||||
case LoungeSubScreen _:
|
case LoungeSubScreen _:
|
||||||
playlistsManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
|
multiplayerRoomManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
|
||||||
playlistsManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
|
multiplayerRoomManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Don't poll inside the match or anywhere else.
|
// Don't poll inside the match or anywhere else.
|
||||||
default:
|
default:
|
||||||
playlistsManager.TimeBetweenListingPolls.Value = 0;
|
multiplayerRoomManager.TimeBetweenListingPolls.Value = 0;
|
||||||
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
|
multiplayerRoomManager.TimeBetweenSelectionPolls.Value = 0;
|
||||||
break;
|
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()
|
protected override Room CreateNewRoom()
|
||||||
{
|
{
|
||||||
var room = new Room { Name = { Value = $"{API.LocalUser}'s awesome room" } };
|
var room = new Room { Name = { Value = $"{API.LocalUser}'s awesome room" } };
|
||||||
room.Category.Value = RoomCategory.Multiplayer;
|
room.Category.Value = RoomCategory.Realtime;
|
||||||
return room;
|
return room;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user