mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Clamp AimCount
to ensure at least one triangle is spawned
This commit is contained in:
@ -172,7 +172,7 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
// Limited by the maximum size of QuadVertexBuffer for safety.
|
// Limited by the maximum size of QuadVertexBuffer for safety.
|
||||||
const int max_triangles = ushort.MaxValue / (IRenderer.VERTICES_PER_QUAD + 2);
|
const int max_triangles = ushort.MaxValue / (IRenderer.VERTICES_PER_QUAD + 2);
|
||||||
|
|
||||||
AimCount = (int)Math.Min(max_triangles, DrawWidth * 0.02f * SpawnRatio);
|
AimCount = (int)Math.Clamp(DrawWidth * 0.02f * SpawnRatio, 1, max_triangles);
|
||||||
|
|
||||||
int currentCount = parts.Count;
|
int currentCount = parts.Count;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user