mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 10:53:21 +08:00
Avoid beatmap lookup per bar in logo visualisation
Just noticed in passing.
This commit is contained in:
parent
197d553238
commit
d69f5fd4cf
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user