File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -120,26 +120,20 @@ class FunkinSoundTray extends FlxSoundTray
120120 active = true ;
121121 alphaTarget = 1 ;
122122
123- for (i in 0 ... _bars .length )
124- _bars [i ].visible = i < getGlobalVolume (up );
125- }
126-
127- function getGlobalVolume (up : Bool = false ): Int
128- {
129123 var globalVolume : Int = Math .round (FlxG .sound .logToLinear (FlxG .sound .volume ) * 10 );
130-
131124 if (FlxG .sound .muted || FlxG .sound .volume == 0 ) globalVolume = 0 ;
132125
126+ for (i in 0 ... _bars .length )
127+ _bars [i ].visible = i < globalVolume ;
128+
133129 if (! silent )
134130 {
135131 // This is a String currently, but there is or was a Flixel PR to change this to a FlxSound or a Sound bject
136132 var sound : String = up ? volumeUpSound : volumeDownSound ;
137-
138133 if (globalVolume == 10 ) sound = volumeMaxSound ;
139- if (sound != null ) FlxG .sound .load (sound ).play ().volume = 0.3 ;
140- }
141134
142- return globalVolume ;
135+ if (sound != null ) FlxG .sound .play (sound );
136+ }
143137 }
144138
145139 function saveVolumePreferences (): Void
You can’t perform that action at this time.
0 commit comments