From a1523fc64c6be6ecf082279637b9a23db18cf221 Mon Sep 17 00:00:00 2001 From: Damgam Date: Thu, 25 Apr 2024 00:48:38 +0200 Subject: [PATCH] 2.0.3 --- DynamicMusicPlayer/DynamicMusicPlayer.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DynamicMusicPlayer/DynamicMusicPlayer.lua b/DynamicMusicPlayer/DynamicMusicPlayer.lua index 2de533a..6c4b791 100644 --- a/DynamicMusicPlayer/DynamicMusicPlayer.lua +++ b/DynamicMusicPlayer/DynamicMusicPlayer.lua @@ -262,7 +262,7 @@ function updateRaceStatusData() IdleTimer = 0 end - if Sim.raceSessionType == 3 and Sim.raceFlagType == 13 and EnableFinishPlaylist then -- finish flag, maybe this one will work reliably in online, lol. + if Sim.raceSessionType == 3 and Sim.raceFlagType == 13 and EnableFinishPlaylist and (not Sim.isReplayActive) then -- finish flag, maybe this one will work reliably in online, lol. PlayerFinished = true else PlayerFinished = false @@ -438,7 +438,7 @@ function updateRaceStatusData() (MusicType == "practice" and Session.type ~= 1) or -- Practice music is playing but we're not in practice (MusicType == "quali" and Session.type ~= 2) or -- Qualification music is playing but we're not in qualis (MusicType == "race" and Session.type ~= 3) or -- Race music is playing but we're not in race - (MusicType ~= "finish" and PlayerFinished and (not PlayedFinishTrack) and FinishMusic[1] and (not Sim.isReplayActive)) or -- We finished the race + (MusicType ~= "finish" and PlayerFinished and (not PlayedFinishTrack) and FinishMusic[1]) or -- We finished the race (EnableMusic == false) or -- We toggled off the music, turn it off (SessionSwitched or TrackSwitched) or -- Session has switched so we should play new track (CurrentTrack and CurrentTrack:currentTime() > CurrentTrack:duration() - 2) -- Track is almost over, fade it out.