1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

naive 10hz update

This commit is contained in:
MaxOhn 2022-01-06 16:04:38 +01:00
parent b9d2a10530
commit 197ada1a8c

View File

@ -34,6 +34,8 @@ namespace osu.Game.Rulesets.Osu.Mods
MaxValue = 1.0f,
};
private DateTime? lastUpdate;
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
{
// Hide judgment displays and follow points
@ -43,6 +45,9 @@ namespace osu.Game.Rulesets.Osu.Mods
public void Update(Playfield playfield)
{
if (DateTime.Now - (lastUpdate ?? DateTime.MinValue) < TimeSpan.FromMilliseconds(100))
return;
Vector2 cursorPos = playfield.Cursor.ActiveCursor.DrawPosition;
double currentTime = playfield.Clock.CurrentTime;
@ -60,6 +65,8 @@ namespace osu.Game.Rulesets.Osu.Mods
drawable.MoveTo(targetPos, h.StartTime - currentTime);
}
}
lastUpdate = DateTime.Now;
}
}
}