mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 12:03:04 +00:00
when stopping radio sound, save radio station's time only if audio source is playing
This commit is contained in:
parent
8e8e495633
commit
1b19e38bc6
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
m_isPlayingRadio = false;
|
||||
m_isWaitingForNewRadioSound = false;
|
||||
|
||||
if (m_currentRadioStationIndex >= 0)
|
||||
// save current station's time
|
||||
if (m_currentRadioStationIndex >= 0 && m_radioAudioSource.isPlaying)
|
||||
RadioStation.stations[m_currentRadioStationIndex].currentTime = m_radioAudioSource.time;
|
||||
|
||||
m_radioAudioSource.Stop();
|
||||
|
|
Loading…
Reference in a new issue