mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-27 12:05:41 +00:00
CVehicle loose ends
This commit is contained in:
parent
c068570192
commit
d71cbae9df
2 changed files with 31 additions and 12 deletions
|
@ -273,12 +273,13 @@ CAutomobile::ProcessControl(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process driver
|
// Process driver
|
||||||
if(IsUpsideDown() && CanPedEnterCar()){
|
if(pDriver)
|
||||||
if(!pDriver->IsPlayer() &&
|
if(IsUpsideDown() && CanPedEnterCar()){
|
||||||
!(pDriver->m_leader && pDriver->m_leader->bInVehicle) &&
|
if(!pDriver->IsPlayer() &&
|
||||||
pDriver->CharCreatedBy != MISSION_CHAR)
|
!(pDriver->m_leader && pDriver->m_leader->bInVehicle) &&
|
||||||
pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
|
pDriver->CharCreatedBy != MISSION_CHAR)
|
||||||
}
|
pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
|
||||||
|
}
|
||||||
|
|
||||||
ActivateBombWhenEntered();
|
ActivateBombWhenEntered();
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
#include "Coronas.h"
|
#include "Coronas.h"
|
||||||
|
|
||||||
|
//--MIAMI: done
|
||||||
|
|
||||||
bool CVehicle::bWheelsOnlyCheat;
|
bool CVehicle::bWheelsOnlyCheat;
|
||||||
bool CVehicle::bAllDodosCheat;
|
bool CVehicle::bAllDodosCheat;
|
||||||
bool CVehicle::bCheat3;
|
bool CVehicle::bCheat3;
|
||||||
|
@ -141,8 +143,26 @@ CVehicle::CVehicle(uint8 CreatedBy)
|
||||||
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
|
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
|
||||||
if(m_audioEntityId >= 0)
|
if(m_audioEntityId >= 0)
|
||||||
DMAudio.SetEntityStatus(m_audioEntityId, true);
|
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_pCurGroundEntity = nil;
|
||||||
m_bRainAudioCounter = 0;
|
m_bRainAudioCounter = 0;
|
||||||
m_bRainSamplesCounter = 0;
|
m_bRainSamplesCounter = 0;
|
||||||
|
@ -1212,8 +1232,7 @@ CVehicle::InflictDamage(CEntity *damagedBy, eWeaponType weaponType, float damage
|
||||||
SetStatus(STATUS_ABANDONED);
|
SetStatus(STATUS_ABANDONED);
|
||||||
pDriver->bFleeAfterExitingCar = true;
|
pDriver->bFleeAfterExitingCar = true;
|
||||||
pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
|
pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
|
||||||
// TODO(MIAMI):
|
pDriver->Say(SOUND_PED_FLEE_SPRINT);
|
||||||
// pDriver->Say(120);
|
|
||||||
}
|
}
|
||||||
int time = 200;
|
int time = 200;
|
||||||
for (int i = 0; i < m_nNumMaxPassengers; i++) {
|
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]->bFleeAfterExitingCar = true;
|
||||||
pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
|
pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
|
||||||
pPassengers[i]->m_objectiveTimer = CTimer::GetTimeInMilliseconds() + time;
|
pPassengers[i]->m_objectiveTimer = CTimer::GetTimeInMilliseconds() + time;
|
||||||
// TODO(MIAMI):
|
pPassengers[i]->Say(SOUND_PED_FLEE_SPRINT);
|
||||||
// pPassengers[i]->Say(120);
|
|
||||||
time += 200;
|
time += 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue