1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:33:21 +08:00

Always process position as long as it's hittable

For example... If a hitobject is pressed but the result is a shake, this
will stop processing hits.
This commit is contained in:
Dan Balasescu 2024-02-07 03:52:51 +09:00
parent e2867986c5
commit 1f13124b38
No known key found for this signature in database

View File

@ -272,20 +272,16 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
case OsuAction.LeftButton:
case OsuAction.RightButton:
// Only update closest press position while the object hasn't been hit yet.
if (HitAction == null)
if (ClosestPressPosition is Vector2 curClosest)
{
if (ClosestPressPosition is Vector2 curClosest)
{
float oldDist = Vector2.DistanceSquared(curClosest, ScreenSpaceDrawQuad.Centre);
float newDist = Vector2.DistanceSquared(e.ScreenSpaceMousePosition, ScreenSpaceDrawQuad.Centre);
float oldDist = Vector2.DistanceSquared(curClosest, ScreenSpaceDrawQuad.Centre);
float newDist = Vector2.DistanceSquared(e.ScreenSpaceMousePosition, ScreenSpaceDrawQuad.Centre);
if (newDist < oldDist)
ClosestPressPosition = e.ScreenSpaceMousePosition;
}
else
if (newDist < oldDist)
ClosestPressPosition = e.ScreenSpaceMousePosition;
}
else
ClosestPressPosition = e.ScreenSpaceMousePosition;
if (IsHovered)
{