From 69b01e727008bb8dd7d15bce834e72aee9ae3ca1 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 14 Apr 2021 00:58:03 +0900 Subject: [PATCH] Add some debugging --- .../OnlinePlay/Multiplayer/Spectate/MultiplayerSpectator.cs | 4 ++++ .../Screens/OnlinePlay/Multiplayer/Spectate/PlayerInstance.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectator.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectator.cs index 636e7b9a49..a56104439d 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectator.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiplayerSpectator.cs @@ -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); diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerInstance.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerInstance.cs index a4a3a0c133..12a710e9f0 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerInstance.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerInstance.cs @@ -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;