summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-07-09 23:06:16 +0200
committerGitHub <noreply@github.com>2020-07-09 23:06:16 +0200
commit30723cf723a6b866c158b9f721f5a3dd01a5d95c (patch)
tree4f4cfd03c6eabfe9ef860c762570760fdedb5f90 /src/vehicles
parentMerge pull request #653 from Domiiniik/miami (diff)
parentVC fighting, Peds, many fixes including ghost bikes (diff)
downloadre3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.tar
re3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.tar.gz
re3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.tar.bz2
re3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.tar.lz
re3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.tar.xz
re3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.tar.zst
re3-30723cf723a6b866c158b9f721f5a3dd01a5d95c.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp4
-rw-r--r--src/vehicles/Cranes.cpp6
-rw-r--r--src/vehicles/Vehicle.cpp6
-rw-r--r--src/vehicles/Vehicle.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 217b383f..fc856de1 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -1349,7 +1349,7 @@ CAutomobile::ProcessControl(void)
if(!IsAlarmOn())
ReduceHornCounter();
}else{
- if(UsesSiren(GetModelIndex())){
+ if(UsesSiren()){
if(Pads[0].bHornHistory[Pads[0].iCurrHornHistory]){
if(Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+4) % 5] &&
Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+3) % 5])
@@ -1559,7 +1559,7 @@ CAutomobile::ProcessControl(void)
if(m_bSirenOrAlarm && (CTimer::GetFrameCounter()&7) == 5 &&
- UsesSiren(GetModelIndex()) && GetModelIndex() != MI_MRWHOOP)
+ UsesSiren() && GetModelIndex() != MI_MRWHOOP)
CCarAI::MakeWayForCarWithSiren(this);
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp
index c8fa1c22..83c727f5 100644
--- a/src/vehicles/Cranes.cpp
+++ b/src/vehicles/Cranes.cpp
@@ -460,7 +460,7 @@ bool CCrane::DoesCranePickUpThisCarType(uint32 mi)
return mi == MI_FIRETRUCK ||
mi == MI_AMBULAN ||
mi == MI_ENFORCER ||
- mi == MI_FBICAR ||
+ mi == MI_FBIRANCH ||
mi == MI_RHINO ||
mi == MI_BARRACKS ||
mi == MI_POLICE;
@@ -474,7 +474,7 @@ bool CCranes::DoesMilitaryCraneHaveThisOneAlready(uint32 mi)
case MI_FIRETRUCK: return (CarsCollectedMilitaryCrane & 1);
case MI_AMBULAN: return (CarsCollectedMilitaryCrane & 2);
case MI_ENFORCER: return (CarsCollectedMilitaryCrane & 4);
- case MI_FBICAR: return (CarsCollectedMilitaryCrane & 8);
+ case MI_FBIRANCH: return (CarsCollectedMilitaryCrane & 8);
case MI_RHINO: return (CarsCollectedMilitaryCrane & 0x10);
case MI_BARRACKS: return (CarsCollectedMilitaryCrane & 0x20);
case MI_POLICE: return (CarsCollectedMilitaryCrane & 0x40);
@@ -489,7 +489,7 @@ void CCranes::RegisterCarForMilitaryCrane(uint32 mi)
case MI_FIRETRUCK: CarsCollectedMilitaryCrane |= 1; break;
case MI_AMBULAN: CarsCollectedMilitaryCrane |= 2; break;
case MI_ENFORCER: CarsCollectedMilitaryCrane |= 4; break;
- case MI_FBICAR: CarsCollectedMilitaryCrane |= 8; break;
+ case MI_FBIRANCH: CarsCollectedMilitaryCrane |= 8; break;
case MI_RHINO: CarsCollectedMilitaryCrane |= 0x10; break;
case MI_BARRACKS: CarsCollectedMilitaryCrane |= 0x20; break;
case MI_POLICE: CarsCollectedMilitaryCrane |= 0x40; break;
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index e26fd99f..2c296ee2 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -1512,7 +1512,7 @@ CVehicle::MakeNonDraggedPedsLeaveVehicle(CPed *ped1, CPed *ped2, CPlayerPed *&pl
for(i = 0; i < numPeds2; i++)
if(peds2[i]->IsFemale() || CGeneral::GetRandomTrueFalse()){
peds2[i]->m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 10000;
- peds2[i]->b156_8 = true;
+ peds2[i]->bHeldHostageInCar = true;
peds2[i]->bFleeAfterExitingCar = true;
}
}
@@ -1557,9 +1557,9 @@ CVehicle::IsLawEnforcementVehicle(void)
}
bool
-CVehicle::UsesSiren(uint32 id)
+CVehicle::UsesSiren(void)
{
- switch(id){
+ switch(GetModelIndex()){
case MI_FIRETRUCK:
case MI_AMBULAN:
case MI_FBICAR:
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index b1e3d803..34106327 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -345,7 +345,7 @@ public:
int FindTyreNearestPoint(float x, float y);
bool IsLawEnforcementVehicle(void);
void ChangeLawEnforcerState(uint8 enable);
- bool UsesSiren(uint32 id);
+ bool UsesSiren(void);
bool IsVehicleNormal(void);
bool CarHasRoof(void);
bool IsUpsideDown(void);