mirror of
https://github.com/osukey/osukey.git
synced 2025-06-22 19:57:56 +09:00
Fix Autopilot mod incompatibility with WindUp/WindDown
This commit is contained in:
parent
ae4d3f712a
commit
72c8f0737e
@ -11,6 +11,7 @@ using osu.Game.Rulesets.Mods;
|
|||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Replays;
|
using osu.Game.Rulesets.Osu.Replays;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
{
|
{
|
||||||
@ -30,6 +31,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
private OsuInputManager inputManager;
|
private OsuInputManager inputManager;
|
||||||
|
|
||||||
|
private GameplayClock gameplayClock;
|
||||||
|
|
||||||
private List<OsuReplayFrame> replayFrames;
|
private List<OsuReplayFrame> replayFrames;
|
||||||
|
|
||||||
private int currentFrame;
|
private int currentFrame;
|
||||||
@ -38,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
if (currentFrame == replayFrames.Count - 1) return;
|
if (currentFrame == replayFrames.Count - 1) return;
|
||||||
|
|
||||||
double time = playfield.Time.Current;
|
double time = gameplayClock.CurrentTime;
|
||||||
|
|
||||||
// Very naive implementation of autopilot based on proximity to replay frames.
|
// Very naive implementation of autopilot based on proximity to replay frames.
|
||||||
// TODO: this needs to be based on user interactions to better match stable (pausing until judgement is registered).
|
// TODO: this needs to be based on user interactions to better match stable (pausing until judgement is registered).
|
||||||
@ -53,6 +56,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
|
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
|
||||||
{
|
{
|
||||||
|
gameplayClock = drawableRuleset.FrameStableClock;
|
||||||
|
|
||||||
// Grab the input manager to disable the user's cursor, and for future use
|
// Grab the input manager to disable the user's cursor, and for future use
|
||||||
inputManager = (OsuInputManager)drawableRuleset.KeyBindingInputManager;
|
inputManager = (OsuInputManager)drawableRuleset.KeyBindingInputManager;
|
||||||
inputManager.AllowUserCursorMovement = false;
|
inputManager.AllowUserCursorMovement = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user