Fix path getting misaligned with negative position values

This commit is contained in:
Dean Herbert 2024-09-05 12:07:16 +09:00
parent 21146c3501
commit 08ebc83a89
No known key found for this signature in database
1 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,7 @@
using osu.Framework.Graphics.Lines; using osu.Framework.Graphics.Lines;
using osu.Framework.Graphics.Performance; using osu.Framework.Graphics.Performance;
using osu.Game.Graphics; using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
{ {
@ -54,10 +55,19 @@ private void updateVertices()
{ {
ClearVertices(); ClearVertices();
Vector2 min = Vector2.Zero;
foreach (var entry in aliveEntries) foreach (var entry in aliveEntries)
{ {
AddVertex(entry.Position); AddVertex(entry.Position);
if (entry.Position.X < min.X)
min.X = entry.Position.X;
if (entry.Position.Y < min.Y)
min.Y = entry.Position.Y;
} }
Position = min;
} }
private sealed class AimLinePointComparator : IComparer<AnalysisFrameEntry> private sealed class AimLinePointComparator : IComparer<AnalysisFrameEntry>