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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user