File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -902,7 +902,8 @@ class PlayState extends MusicBeatSubState
902
902
if (isInCountdown )
903
903
{
904
904
// Do NOT apply offsets at this point, because they already got applied the previous frame!
905
- if (focus ) Conductor .instance .update (Conductor .instance .songPosition + elapsed * 1000 , false );
905
+ @:privateAccess
906
+ if (FlxG .game ._lostFocus && Preferences .autoPause ) Conductor .instance .update (Conductor .instance .songPosition + elapsed * 1000 , false );
906
907
if (Conductor .instance .songPosition >= (startTimestamp + Conductor .instance .combinedOffset ))
907
908
{
908
909
trace (" started song at " + Conductor .instance .songPosition );
@@ -921,9 +922,9 @@ class PlayState extends MusicBeatSubState
921
922
Conductor .instance .formatOffset = 0.0 ;
922
923
}
923
924
924
- if ( focus ) Conductor . instance . update (( FlxG . sound . music . pitch != 1 ) ? FlxG . sound . music . time + elapsed * 1000 : ( Conductor . instance . songPosition
925
- + elapsed * 1000 ),
926
- false ); // Normal conductor update.
925
+ @ :privateAccess
926
+ if ( FlxG . game . _lostFocus && Preferences . autoPause ) Conductor . instance . update (( FlxG . sound . music . pitch != 1 ) ? FlxG . sound . music . time + elapsed * 1000
927
+ : ( Conductor . instance . songPosition + elapsed * 1000 ), false ); // Normal conductor update.
927
928
928
929
// If, after updating the conductor, the instrumental has finished, end the song immediately.
929
930
// This helps prevent a major bug where the level suddenly loops back to the start or middle.
You can’t perform that action at this time.
0 commit comments