mirror of
https://github.com/ppy/osu
synced 2025-02-16 10:07:11 +00:00
Use integer count for tiny droplet generation
This commit is contained in:
parent
aaba377e11
commit
1a5a238752
@ -90,13 +90,17 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
time = Math.Max(StartTime + Duration / 2, time - LegacyLastTickOffset.Value);
|
time = Math.Max(StartTime + Duration / 2, time - LegacyLastTickOffset.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int tinyTickCount = 1;
|
||||||
double tinyTickInterval = time - lastTickTime;
|
double tinyTickInterval = time - lastTickTime;
|
||||||
while (tinyTickInterval > 100)
|
while (tinyTickInterval > 100 && tinyTickCount < 10000)
|
||||||
tinyTickInterval /= 2;
|
|
||||||
|
|
||||||
// we don't want to generate at (t == time - epsilon) due to floating point accuracy. time - 1 seems working.
|
|
||||||
for (double t = lastTickTime + tinyTickInterval; t < time - 1; t += tinyTickInterval)
|
|
||||||
{
|
{
|
||||||
|
tinyTickInterval /= 2;
|
||||||
|
tinyTickCount *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int tinyTickIndex = 0; tinyTickIndex < tinyTickCount - 1; tinyTickIndex++)
|
||||||
|
{
|
||||||
|
var t = lastTickTime + (tinyTickIndex + 1) * tinyTickInterval;
|
||||||
double progress = reversed ? 1 - (t - spanStartTime) / spanDuration : (t - spanStartTime) / spanDuration;
|
double progress = reversed ? 1 - (t - spanStartTime) / spanDuration : (t - spanStartTime) / spanDuration;
|
||||||
|
|
||||||
AddNested(new TinyDroplet
|
AddNested(new TinyDroplet
|
||||||
|
Loading…
Reference in New Issue
Block a user