assign random radio station in Awake(), not Start()

This commit is contained in:
in0finite 2020-05-05 18:23:52 +02:00
parent 15711064c4
commit cdb561c4a7

View file

@ -25,11 +25,12 @@ namespace SanAndreasUnity.Behaviours.Vehicles
void Awake_Radio()
{
m_radioAudioSource = this.GetComponent<AudioSource>();
m_currentRadioStationIndex = Random.Range(0, RadioStation.stations.Length);
}
void Start_Radio()
{
m_currentRadioStationIndex = Random.Range(0, RadioStation.stations.Length);
}
void OnPedPreparedForVehicle_Radio(Ped ped, Seat seat)