Improve implementation of TestSpectatorClient

There was a lot of weirdness here, such as storing the playing users,
clearing the playing users from test scenes (!!), and storing the users
being wathed.
This was all a thing because the previous implementation overrode the
base method implementations, which is no longer a thing.
This commit is contained in:
smoogipoo
2021-05-20 17:41:46 +09:00
parent 750a5c3ea9
commit 9d07749959
5 changed files with 46 additions and 34 deletions

View File

@ -66,7 +66,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("finish previous gameplay", () =>
{
foreach (var id in playingUserIds)
spectatorClient.EndPlay(id, importedBeatmapId);
spectatorClient.EndPlay(id);
playingUserIds.Clear();
});
}
@ -258,11 +258,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
});
}
private void finish(int userId, int? beatmapId = null)
private void finish(int userId)
{
AddStep("end play", () =>
{
spectatorClient.EndPlay(userId, beatmapId ?? importedBeatmapId);
spectatorClient.EndPlay(userId);
playingUserIds.Remove(userId);
nextFrame.Remove(userId);
});