@@ -1689,17 +1689,12 @@ class PlayState extends MusicBeatState
16891689 endingSong = true ;
16901690 gameAndCharsCall (" onSongEnd" );
16911691 canPause = false ;
1692- inst .volume = 0 ;
1693- vocals .volume = 0 ;
1694- for (strumLine in strumLines .members ) {
1695- strumLine .vocals .volume = 0 ;
1696- strumLine .vocals .pause ();
1697- }
1698- inst .pause ();
1699- vocals .pause ();
17001692
1701- if (validScore )
1702- {
1693+ for (strumLine in strumLines .members ) strumLine .vocals .stop ();
1694+ inst .stop ();
1695+ vocals .stop ();
1696+
1697+ if (validScore ) {
17031698 #if !switch
17041699 FunkinSave .setSongHighscore (SONG .meta .name , difficulty , {
17051700 score : songScore ,
@@ -1727,20 +1722,18 @@ class PlayState extends MusicBeatState
17271722 * Immediately switches to the next song, or goes back to the Story/Freeplay menu.
17281723 */
17291724 public function nextSong () {
1730- if (isStoryMode )
1731- {
1725+ if (isStoryMode ) {
17321726 campaignScore + = songScore ;
17331727 campaignMisses + = misses ;
17341728 campaignAccuracyTotal + = accuracy ;
17351729 campaignAccuracyCount ++ ;
17361730 storyPlaylist .shift ();
17371731
1738- if (storyPlaylist .length <= 0 )
1739- {
1732+ if (storyPlaylist .length <= 0 ) {
17401733 FlxG .switchState (new StoryMenuState ());
17411734
1742- if (validScore )
1743- {
1735+ if (validScore ) {
1736+ #if !switch
17441737 // TODO: more week info saving
17451738 FunkinSave .setWeekHighscore (storyWeek .id , difficulty , {
17461739 score : campaignScore ,
@@ -1749,29 +1742,23 @@ class PlayState extends MusicBeatState
17491742 hits : [],
17501743 date : Date .now ().toString ()
17511744 });
1745+ #end
17521746 }
17531747 FlxG .save .flush ();
17541748 }
1755- else
1756- {
1749+ else {
17571750 Logs .infos (' Loading next song ( ${storyPlaylist [0 ].toLowerCase ()}/ $difficulty )' , " PlayState" );
17581751
17591752 registerSmoothTransition ();
17601753
1761- FlxG .sound .music .stop ();
1762-
17631754 __loadSong (storyPlaylist [0 ], difficulty );
1764-
17651755 FlxG .switchState (new PlayState ());
17661756 }
17671757 }
1758+ else if (chartingMode )
1759+ FlxG .switchState (new funkin.editors.charter. Charter (SONG .meta .name , difficulty , false ));
17681760 else
1769- {
1770- if (chartingMode )
1771- FlxG .switchState (new funkin.editors.charter. Charter (SONG .meta .name , difficulty , false ));
1772- else
1773- FlxG .switchState (new FreeplayState ());
1774- }
1761+ FlxG .switchState (new FreeplayState ());
17751762 }
17761763
17771764 public function registerSmoothTransition () {
@@ -1943,6 +1930,8 @@ class PlayState extends MusicBeatState
19431930 }
19441931
19451932 if (event .deleteNote ) strumLine .deleteNote (note );
1933+
1934+ gameAndCharsEvent (" onPostNoteHit" , event );
19461935 }
19471936
19481937 public function displayRating (myRating : String , ? evt : NoteHitEvent = null ): Void {
0 commit comments