1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 05:39:53 +08:00

Clone countdown objects in test client

Beyond isolation, this stuff is also used to test (de-)serialisation.
Much-of-a-muchness in this case since it isn't too thoroughly tested,
but best do it anyway.
This commit is contained in:
Dan Balasescu
2025-04-08 18:41:43 +09:00
Unverified
parent 5769292daf
commit 874ec49590
@@ -415,12 +415,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
TimeRemaining = startCountdown.Duration
});
await ((IMultiplayerClient)this).MatchEvent(new CountdownStartedEvent(ServerRoom.ActiveCountdowns[^1])).ConfigureAwait(false);
await ((IMultiplayerClient)this).MatchEvent(clone(new CountdownStartedEvent(ServerRoom.ActiveCountdowns[^1]))).ConfigureAwait(false);
break;
case StopCountdownRequest stopCountdown:
ServerRoom.ActiveCountdowns.Remove(ServerRoom.ActiveCountdowns.First(c => c.ID == stopCountdown.ID));
await ((IMultiplayerClient)this).MatchEvent(new CountdownStoppedEvent(stopCountdown.ID)).ConfigureAwait(false);
await ((IMultiplayerClient)this).MatchEvent(clone(new CountdownStoppedEvent(stopCountdown.ID))).ConfigureAwait(false);
break;
}
}