mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Fix player instantiation
Since ModTestScene.CreatePlayer would apply mods in addition to instantiating the player, overriding it could lead to mistakenly also overriding the code that was supposed to set up the test via currentTestData. Make ModTestScene.CreatePlayer sealed, which ensures that mod & autoplay changes are applied, and expose ModTestScene.CreateModPlayer instead which has the expected semantics.
This commit is contained in:
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual
|
||||
PassCondition = () => ((PerfectModTestPlayer)Player).CheckFailed(shouldMiss && testCaseData.FailOnMiss)
|
||||
});
|
||||
|
||||
protected override TestPlayer CreatePlayer(Ruleset ruleset) => new PerfectModTestPlayer();
|
||||
protected override TestPlayer CreateModPlayer(Ruleset ruleset) => new PerfectModTestPlayer();
|
||||
|
||||
private class PerfectModTestPlayer : TestPlayer
|
||||
{
|
||||
|
Reference in New Issue
Block a user