From 153e204d200bf554b19236c5fc283982047e148c Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Thu, 24 Jun 2021 13:22:10 +0800 Subject: [PATCH] Cap rotation ratio to 1 --- osu.Game.Rulesets.Osu/Utils/VectorHelper.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Utils/VectorHelper.cs b/osu.Game.Rulesets.Osu/Utils/VectorHelper.cs index bc482a3dd7..e3fe3249e8 100644 --- a/osu.Game.Rulesets.Osu/Utils/VectorHelper.cs +++ b/osu.Game.Rulesets.Osu/Utils/VectorHelper.cs @@ -68,7 +68,11 @@ namespace osu.Game.Rulesets.Osu.Utils ); } - return RotateVectorTowardsVector(posRelativeToPrev, playfield_middle - prevObjectPos, relativeRotationDistance * rotationRatio); + return RotateVectorTowardsVector( + posRelativeToPrev, + playfield_middle - prevObjectPos, + Math.Min(1, relativeRotationDistance * rotationRatio) + ); } ///