From 46bcabea6c5714cb8a8980aa33cbff2ddc746233 Mon Sep 17 00:00:00 2001 From: Alden Wu Date: Fri, 14 Oct 2022 12:42:04 -0700 Subject: [PATCH] Separate smoke rotation seed and index --- osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs b/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs index 7af1b5d86a..aba4d0ff63 100644 --- a/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs +++ b/osu.Game.Rulesets.Osu/Skinning/SmokeSegment.cs @@ -234,7 +234,7 @@ public sealed override void Draw(IRenderer renderer) if (points.Count == 0) return; - rotationIndex = rotationSeed; + rotationIndex = 0; quadBatch ??= renderer.CreateQuadBatch(max_point_count / 10, 10); texture ??= renderer.WhitePixel; @@ -314,11 +314,7 @@ protected virtual Vector2 PointDirection(SmokePoint point) return new Vector2(MathF.Sin(angle), -MathF.Cos(angle)); } - private float nextRotation() - { - rotationIndex++; - return max_rotation * (StatelessRNG.NextSingle(rotationIndex) * 2 - 1); - } + private float nextRotation() => max_rotation * (StatelessRNG.NextSingle(rotationSeed, rotationIndex++) * 2 - 1); private void drawPointQuad(SmokePoint point, RectangleF textureRect) {