1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 10:53:21 +08:00

Merge pull request #31047 from peppy/silly-thing

Avoid beatmap lookup per bar in logo visualisation
This commit is contained in:
Salman Alshamrani 2024-12-10 03:41:44 -05:00 committed by GitHub
commit d8e545e034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,9 +106,12 @@ namespace osu.Game.Screens.Menu
foreach (var source in amplitudeSources)
addAmplitudesFromSource(source);
float kiaiMultiplier = beatSyncProvider.CheckIsKiaiTime() ? 1 : 0.5f;
for (int i = 0; i < bars_per_visualiser; i++)
{
float targetAmplitude = (temporalAmplitudes[(i + indexOffset) % bars_per_visualiser]) * (beatSyncProvider.CheckIsKiaiTime() ? 1 : 0.5f);
float targetAmplitude = (temporalAmplitudes[(i + indexOffset) % bars_per_visualiser]) * kiaiMultiplier;
if (targetAmplitude > frequencyAmplitudes[i])
frequencyAmplitudes[i] = targetAmplitude;
}