1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 06:12:55 +08:00

Add some debugging

This commit is contained in:
smoogipoo 2021-04-14 00:58:03 +09:00
parent 77830527e7
commit 69b01e7270
2 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@ using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Framework.Utils;
using osu.Game.Online.Spectator;
using osu.Game.Screens.Spectate;
@ -108,6 +109,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
double targetTrackTime = validInstances.Select(i => i.GetCurrentTrackTime()).Max();
var instanceTimes = string.Join(',', validInstances.Select(i => $" {i.User.Id}: {(int)i.GetCurrentTrackTime()}"));
Logger.Log($"target: {(int)targetTrackTime},{instanceTimes}");
foreach (var inst in validInstances)
{
Debug.Assert(inst != null);

View File

@ -103,12 +103,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
if (catchupRequired)
{
Beatmap.Track.AddAdjustment(AdjustableProperty.Frequency, catchupFrequencyAdjustment);
Logger.Log($"{User.Id} catchup started (behind: {timeBehind})");
Logger.Log($"{User.Id} catchup started (behind: {(int)timeBehind})");
}
else
{
Beatmap.Track.RemoveAdjustment(AdjustableProperty.Frequency, catchupFrequencyAdjustment);
Logger.Log($"{User.Id} catchup finished (behind: {timeBehind})");
Logger.Log($"{User.Id} catchup finished (behind: {(int)timeBehind})");
}
IsCatchingUp = catchupRequired;