diff --git a/Source/2_Core/Models/AbstractReplay/GenericReplayData.cs b/Source/2_Core/Models/AbstractReplay/GenericReplayData.cs index a233a431..b959c4f4 100644 --- a/Source/2_Core/Models/AbstractReplay/GenericReplayData.cs +++ b/Source/2_Core/Models/AbstractReplay/GenericReplayData.cs @@ -1,9 +1,15 @@ namespace BeatLeader.Models.AbstractReplay { public class GenericReplayData : IReplayData { public GenericReplayData( - float failTime, string timestamp, bool leftHanded, - GameplayModifiers gameplayModifiers, float jumpDistance, - Player? player = null, PracticeSettings? practiceSettings = null) { + float failTime, + int timestamp, + bool leftHanded, + float jumpDistance, + float? fixedHeight, + GameplayModifiers gameplayModifiers, + Player? player = null, + PracticeSettings? practiceSettings = null + ) { FailTime = failTime; Timestamp = timestamp; LeftHanded = leftHanded; @@ -11,12 +17,16 @@ public GenericReplayData( JumpDistance = jumpDistance; Player = player; PracticeSettings = practiceSettings; + FixedHeight = fixedHeight; } + public bool LeftHanded { get; } + public float? FixedHeight { get; } public float JumpDistance { get; } + public float FailTime { get; } - public string Timestamp { get; } - public bool LeftHanded { get; } + public int Timestamp { get; } + public Player? Player { get; } public PracticeSettings? PracticeSettings { get; } public GameplayModifiers GameplayModifiers { get; } diff --git a/Source/2_Core/Models/AbstractReplay/IReplayData.cs b/Source/2_Core/Models/AbstractReplay/IReplayData.cs index f770dbaa..8ad2a352 100644 --- a/Source/2_Core/Models/AbstractReplay/IReplayData.cs +++ b/Source/2_Core/Models/AbstractReplay/IReplayData.cs @@ -1,9 +1,12 @@ namespace BeatLeader.Models.AbstractReplay { public interface IReplayData { bool LeftHanded { get; } + float? FixedHeight { get; } float JumpDistance { get; } + float FailTime { get; } - string Timestamp { get; } + int Timestamp { get; } + Player? Player { get; } PracticeSettings? PracticeSettings { get; } GameplayModifiers GameplayModifiers { get; } diff --git a/Source/7_Utils/ReplayDataUtils.cs b/Source/7_Utils/ReplayDataUtils.cs index ed93ac39..8d03377c 100644 --- a/Source/7_Utils/ReplayDataUtils.cs +++ b/Source/7_Utils/ReplayDataUtils.cs @@ -22,10 +22,11 @@ public static IReplay ConvertToAbstractReplay(Replay replay, Player? player) { var replayData = replay.info; var creplayData = new GenericReplayData( replayData.failTime, - replayData.timestamp, + int.Parse(replayData.timestamp), replayData.leftHanded, - replay.GetModifiersFromReplay(), replayData.jumpDistance, + replay.heights.Count == 0 ? replayData.height : null, + replay.GetModifiersFromReplay(), player, replay.GetPracticeSettingsFromReplay()); var frames = replay.frames.Select(static x => new PlayerMovementFrame( diff --git a/Source/7_Utils/StaticUtils/AbstractReplayUtils.cs b/Source/7_Utils/StaticUtils/AbstractReplayUtils.cs index c894a45a..53957ce6 100644 --- a/Source/7_Utils/StaticUtils/AbstractReplayUtils.cs +++ b/Source/7_Utils/StaticUtils/AbstractReplayUtils.cs @@ -29,13 +29,13 @@ public static StandardLevelScenesTransitionSetupDataSO CreateTransitionData(this : launchData.MainReplay.ReplayData.PracticeSettings; var beatmap = launchData.DifficultyBeatmap; - transitionData.Init("Solo", beatmap, beatmap!.level, envSettings, + transitionData.Init("Solo", beatmap, beatmap.level, envSettings, playerData.colorSchemesSettings.GetOverrideColorScheme(), replay.ReplayData.GameplayModifiers, playerData.playerSpecificSettings.GetPlayerSettingsByReplay(replay), practiceSettings, "Menu"); - return transitionData!; + return transitionData; } public static NoteCutInfo SaturateNoteCutInfo(this NoteCutInfo cutInfo, NoteData data) { @@ -62,7 +62,7 @@ public static NoteCutInfo SaturateNoteCutInfo(this NoteCutInfo cutInfo, NoteData } private static PlayerSpecificSettings GetPlayerSettingsByReplay(this PlayerSpecificSettings settings, IReplay replay) { - return settings.CopyWith(replay.ReplayData.LeftHanded, automaticPlayerHeight: true); + return settings.CopyWith(replay.ReplayData.LeftHanded, replay.ReplayData.FixedHeight, replay.ReplayData.FixedHeight is null); } } } \ No newline at end of file