1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 06:07:23 +08:00

Fix replays not loading.

This commit is contained in:
smoogipooo 2017-08-23 16:48:13 +09:00
parent 42e6865493
commit 8ddc13e394

View File

@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.UI
/// Sets a replay to be used, overriding local input. /// Sets a replay to be used, overriding local input.
/// </summary> /// </summary>
/// <param name="replay">The replay, null for local input.</param> /// <param name="replay">The replay, null for local input.</param>
public void SetReplay(Replay replay) public virtual void SetReplay(Replay replay)
{ {
Replay = replay; Replay = replay;
InputManager.ReplayInputHandler = replay != null ? CreateReplayInputHandler(replay) : null; InputManager.ReplayInputHandler = replay != null ? CreateReplayInputHandler(replay) : null;
@ -272,6 +272,11 @@ namespace osu.Game.Rulesets.UI
KeyBindingInputManager.Add(Playfield = CreatePlayfield()); KeyBindingInputManager.Add(Playfield = CreatePlayfield());
loadObjects(); loadObjects();
}
public override void SetReplay(Replay replay)
{
base.SetReplay(replay);
if (InputManager?.ReplayInputHandler != null) if (InputManager?.ReplayInputHandler != null)
InputManager.ReplayInputHandler.ToScreenSpace = Playfield.ScaledContent.ToScreenSpace; InputManager.ReplayInputHandler.ToScreenSpace = Playfield.ScaledContent.ToScreenSpace;