summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Automobile.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-18 13:08:24 +0200
committerGitHub <noreply@github.com>2020-05-18 13:08:24 +0200
commit2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e (patch)
treeda615f0e7ebbaf9c7c9e48ed283569e3056e3adb /src/vehicles/Automobile.cpp
parentMerge pull request #558 from Sergeanur/VC/text (diff)
parentsome debug changes (diff)
downloadre3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.gz
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.bz2
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.lz
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.xz
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.zst
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.zip
Diffstat (limited to 'src/vehicles/Automobile.cpp')
-rw-r--r--src/vehicles/Automobile.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 5f78e2a9..aad31bbf 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -72,6 +72,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
bFixedColour = false;
bBigWheels = false;
bWaterTight = false;
+ bTankDetonateCars = true;
SetModelIndex(id);
@@ -332,7 +333,7 @@ CAutomobile::ProcessControl(void)
bool playerRemote = false;
switch(GetStatus()){
case STATUS_PLAYER_REMOTE:
- if(CPad::GetPad(0)->WeaponJustDown()){
+ if(CPad::GetPad(0)->WeaponJustDown() && !bDisableRemoteDetonation){
BlowUpCar(FindPlayerPed());
CRemote::TakeRemoteControlledCarFromPlayer();
}
@@ -4148,7 +4149,7 @@ CAutomobile::BlowUpCarsInPath(void)
{
int i;
- if(m_vecMoveSpeed.Magnitude() > 0.1f)
+ if(m_vecMoveSpeed.Magnitude() > 0.1f && bTankDetonateCars)
for(i = 0; i < m_nCollisionRecords; i++)
if(m_aCollisionRecords[i] &&
m_aCollisionRecords[i]->IsVehicle() &&
@@ -4610,6 +4611,18 @@ CAutomobile::SetAllTaxiLights(bool set)
m_sAllTaxiLights = set;
}
+void
+CAutomobile::TellHeliToGoToCoors(float x, float y, float z, uint8 speed)
+{
+ AutoPilot.m_nCarMission = MISSION_HELI_FLYTOCOORS;
+ AutoPilot.m_vecDestinationCoors.x = x;
+ AutoPilot.m_vecDestinationCoors.y = y;
+ AutoPilot.m_vecDestinationCoors.z = z;
+ AutoPilot.m_nCruiseSpeed = speed;
+ SetStatus(STATUS_PHYSICS);
+ //TODO(MIAMI)
+}
+
#ifdef COMPATIBLE_SAVES
void
CAutomobile::Save(uint8*& buf)