From 052bf2a6e07745ba9832345e896249ab6452ca44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 23 Aug 2023 13:54:11 +0200 Subject: [PATCH] Use alternative solution for timing offset woes on export --- .../TestSceneObjectOrderedHitPolicy.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneObjectOrderedHitPolicy.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneObjectOrderedHitPolicy.cs index fd8973c375..eff96febaa 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestSceneObjectOrderedHitPolicy.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestSceneObjectOrderedHitPolicy.cs @@ -437,7 +437,8 @@ namespace osu.Game.Rulesets.Osu.Tests }, BeatmapInfo = { - Ruleset = new OsuRuleset().RulesetInfo + Ruleset = new OsuRuleset().RulesetInfo, + BeatmapVersion = LegacyBeatmapEncoder.FIRST_LAZER_VERSION // for correct offset treatment by score encoder }, ControlPointInfo = cpi }); @@ -486,13 +487,8 @@ namespace osu.Game.Rulesets.Osu.Tests AddStep("export score", () => { - var scoreToEncode = score.DeepClone(); - scoreToEncode.Replay.Frames = scoreToEncode.Replay.Frames.Cast() - .Select(frame => new OsuReplayFrame(frame.Time + LegacyBeatmapDecoder.EARLY_VERSION_TIMING_OFFSET, frame.Position, frame.Actions.ToArray())) - .ToList(); - using var stream = File.Open(Path.Combine(exportLocation, $"{testCaseName}.osr"), FileMode.Create); - var encoder = new LegacyScoreEncoder(scoreToEncode, playableBeatmap); + var encoder = new LegacyScoreEncoder(score, playableBeatmap); encoder.Encode(stream); }); }