Overhaul MusicManager - fix radio bugs, scroll to prev station, radio off text

This commit is contained in:
erorcun
2021-01-30 14:52:48 +03:00
parent 990637bf52
commit 902e539c0d
15 changed files with 393 additions and 264 deletions

View File

@ -152,7 +152,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
if(m_audioEntityId >= 0)
DMAudio.SetEntityStatus(m_audioEntityId, true);
//m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK;
//m_nRadioStation = CGeneral::GetRandomNumber() % NUM_RADIOS;
switch(GetModelIndex()){
case MI_HUNTER:
case MI_ANGEL:
@ -169,7 +169,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_nRadioStation = RADIO_OFF;
break;
default:
m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK;
m_nRadioStation = CGeneral::GetRandomNumber() % NUM_RADIOS;
break;
}
m_pCurGroundEntity = nil;

View File

@ -266,7 +266,7 @@ public:
eCarLock m_nDoorLock;
int8 m_nLastWeaponDamage; // see eWeaponType, -1 if no damage
CEntity *m_pLastDamageEntity;
int8 m_nRadioStation;
uint8 m_nRadioStation;
uint8 m_bRainAudioCounter;
uint8 m_bRainSamplesCounter;
uint32 m_nCarHornTimer;