1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 20:20:02 +00:00
This commit is contained in:
Nikolay Korolev 2020-05-16 14:01:32 +03:00
parent 6556cb0db9
commit c33b93793f
3 changed files with 16 additions and 2 deletions

View file

@ -4024,10 +4024,22 @@ CAutomobile::PlayCarHorn(void)
{ {
int r; int r;
if (m_nAlarmState && m_nAlarmState != -1)
return;
if (GetStatus() == STATUS_WRECKED)
return;
if(m_nCarHornTimer != 0) if(m_nCarHornTimer != 0)
return; return;
r = CGeneral::GetRandomNumber() & 7; if (m_nCarHornDelay) {
m_nCarHornDelay--;
return;
}
m_nCarHornDelay = (CGeneral::GetRandomNumber() & 0x7F) + 150;
r = m_nCarHornDelay & 7;
if(r < 2){ if(r < 2){
m_nCarHornTimer = 45; m_nCarHornTimer = 45;
}else if(r < 4){ }else if(r < 4){

View file

@ -101,6 +101,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_bSirenOrAlarm = 0; m_bSirenOrAlarm = 0;
m_nCarHornTimer = 0; m_nCarHornTimer = 0;
m_nCarHornPattern = 0; m_nCarHornPattern = 0;
m_nCarHornDelay = 0;
bPartOfConvoy = false; bPartOfConvoy = false;
bCreatedAsPoliceVehicle = false; bCreatedAsPoliceVehicle = false;
bParking = false; bParking = false;

View file

@ -211,8 +211,9 @@ public:
uint8 m_bRainAudioCounter; uint8 m_bRainAudioCounter;
uint8 m_bRainSamplesCounter; uint8 m_bRainSamplesCounter;
uint8 m_nCarHornTimer; uint8 m_nCarHornTimer;
uint8 m_nCarHornPattern; // last horn? uint8 m_nCarHornPattern;
bool m_bSirenOrAlarm; bool m_bSirenOrAlarm;
uint8 m_nCarHornDelay;
int8 m_comedyControlState; int8 m_comedyControlState;
CStoredCollPoly m_aCollPolys[2]; // poly which is under front/rear part of car CStoredCollPoly m_aCollPolys[2]; // poly which is under front/rear part of car
float m_fSteerRatio; float m_fSteerRatio;