mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 15:27:30 +08:00
Clamp X value to avoid excessive balance shift
This commit is contained in:
parent
fdb63bd7cd
commit
47f89b8969
@ -225,7 +225,7 @@ namespace osu.Game.Screens.Ranking
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
audioContent.Balance.Value = ((ScreenSpaceDrawQuad.Centre.X / game.ScreenSpaceDrawQuad.Width) * 2 - 1) * OsuGameBase.SFX_STEREO_STRENGTH;
|
||||
audioContent.Balance.Value = (Math.Clamp(ScreenSpaceDrawQuad.Centre.X / game.ScreenSpaceDrawQuad.Width, -1, 1) * 2 - 1) * OsuGameBase.SFX_STEREO_STRENGTH;
|
||||
}
|
||||
|
||||
private void playAppearSample()
|
||||
|
Loading…
Reference in New Issue
Block a user