diff options
author | aap <aap@papnet.eu> | 2020-05-27 07:43:38 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-27 07:43:38 +0200 |
commit | d71cbae9df040d72176776e8be999b0fbb1f14d2 (patch) | |
tree | c6849875804e92f0f333501b1d25f9995a02e74c /src | |
parent | Merge pull request #600 from Fire-Head/miami (diff) | |
download | re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.tar re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.tar.gz re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.tar.bz2 re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.tar.lz re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.tar.xz re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.tar.zst re3-d71cbae9df040d72176776e8be999b0fbb1f14d2.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicles/Automobile.cpp | 13 | ||||
-rw-r--r-- | src/vehicles/Vehicle.cpp | 30 |
2 files changed, 31 insertions, 12 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index fbcf610c..9fa0df39 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -273,12 +273,13 @@ CAutomobile::ProcessControl(void) } // Process driver - if(IsUpsideDown() && CanPedEnterCar()){ - if(!pDriver->IsPlayer() && - !(pDriver->m_leader && pDriver->m_leader->bInVehicle) && - pDriver->CharCreatedBy != MISSION_CHAR) - pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this); - } + if(pDriver) + if(IsUpsideDown() && CanPedEnterCar()){ + if(!pDriver->IsPlayer() && + !(pDriver->m_leader && pDriver->m_leader->bInVehicle) && + pDriver->CharCreatedBy != MISSION_CHAR) + pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this); + } ActivateBombWhenEntered(); diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 1dc7af11..7e4ff2fe 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -31,6 +31,8 @@ #include "Weather.h" #include "Coronas.h" +//--MIAMI: done + bool CVehicle::bWheelsOnlyCheat; bool CVehicle::bAllDodosCheat; bool CVehicle::bCheat3; @@ -141,8 +143,26 @@ CVehicle::CVehicle(uint8 CreatedBy) m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this); if(m_audioEntityId >= 0) DMAudio.SetEntityStatus(m_audioEntityId, true); -// TODO(MIAMI): - m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK; + //m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK; + switch(GetModelIndex()){ + case MI_HUNTER: + case MI_ANGEL: + case MI_FREEWAY: + m_nRadioStation = V_ROCK; + break; + case MI_RCBARON: + case MI_RCBANDIT: + case MI_RCRAIDER: + case MI_RCGOBLIN: + case MI_TOPFUN: + case MI_CADDY: + case MI_BAGGAGE: + m_nRadioStation = RADIO_OFF; + break; + default: + m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK; + break; + } m_pCurGroundEntity = nil; m_bRainAudioCounter = 0; m_bRainSamplesCounter = 0; @@ -1212,8 +1232,7 @@ CVehicle::InflictDamage(CEntity *damagedBy, eWeaponType weaponType, float damage SetStatus(STATUS_ABANDONED); pDriver->bFleeAfterExitingCar = true; pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this); -// TODO(MIAMI): -// pDriver->Say(120); + pDriver->Say(SOUND_PED_FLEE_SPRINT); } int time = 200; for (int i = 0; i < m_nNumMaxPassengers; i++) { @@ -1223,8 +1242,7 @@ CVehicle::InflictDamage(CEntity *damagedBy, eWeaponType weaponType, float damage pPassengers[i]->bFleeAfterExitingCar = true; pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this); pPassengers[i]->m_objectiveTimer = CTimer::GetTimeInMilliseconds() + time; -// TODO(MIAMI): -// pPassengers[i]->Say(120); + pPassengers[i]->Say(SOUND_PED_FLEE_SPRINT); time += 200; } } |