diff options
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Automobile.cpp | 17 | ||||
-rw-r--r-- | src/vehicles/Automobile.h | 3 | ||||
-rw-r--r-- | src/vehicles/Vehicle.cpp | 13 | ||||
-rw-r--r-- | src/vehicles/Vehicle.h | 13 |
4 files changed, 32 insertions, 14 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index d1f2faaa..8486d9e1 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(); } @@ -4139,7 +4140,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() && @@ -4601,6 +4602,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); + assert(0); // TODO(MIAMI) +} + #ifdef COMPATIBLE_SAVES void CAutomobile::Save(uint8*& buf) diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h index 8c5c8f8e..e096465e 100644 --- a/src/vehicles/Automobile.h +++ b/src/vehicles/Automobile.h @@ -91,6 +91,7 @@ public: uint8 bWaterTight : 1; // no damage for non-player peds uint8 bNotDamagedUpsideDown : 1; uint8 bMoreResistantToDamage : 1; + uint8 bTankDetonateCars : 1; int16 field_4E0; uint16 m_hydraulicState; uint32 m_nBusDoorTimerEnd; @@ -178,6 +179,8 @@ public: void SetBumperDamage(int32 component, ePanels panel, bool noFlyingComponents = false); void SetDoorDamage(int32 component, eDoors door, bool noFlyingComponents = false); + void TellHeliToGoToCoors(float x, float y, float z, uint8 speed); + void Fix(void); void SetComponentVisibility(RwFrame *frame, uint32 flags); void SetupModelNodes(void); diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index df8c71b0..2fdc298f 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -29,6 +29,7 @@ bool CVehicle::bCheat5; bool CVehicle::bAltDodoCheat; #endif bool CVehicle::m_bDisableMouseSteering = true; +bool CVehicle::bDisableRemoteDetonation; void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); } void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); } @@ -1353,14 +1354,14 @@ eVehicleAppearance CVehicle::GetVehicleAppearance(void) { if (IsCar()) - return VEHICLE_CAR; + return VEHICLE_APPEARANCE_CAR; if (IsBoat()) - return VEHICLE_BOAT; + return VEHICLE_APPEARANCE_BOAT; if (IsBike()) - return VEHICLE_BIKE; + return VEHICLE_APPEARANCE_BIKE; if (IsPlane()) - return VEHICLE_PLANE; + return VEHICLE_APPEARANCE_PLANE; if (IsHeli()) - return VEHICLE_HELI; - return VEHICLE_NONE; + return VEHICLE_APPEARANCE_HELI; + return VEHICLE_APPEARANCE_NONE; } diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index c9e6bf93..fc138f45 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -112,12 +112,12 @@ enum eFlightModel enum eVehicleAppearance { - VEHICLE_NONE, - VEHICLE_CAR, - VEHICLE_BIKE, - VEHICLE_HELI, - VEHICLE_BOAT, - VEHICLE_PLANE, + VEHICLE_APPEARANCE_NONE, + VEHICLE_APPEARANCE_CAR, + VEHICLE_APPEARANCE_BIKE, + VEHICLE_APPEARANCE_HELI, + VEHICLE_APPEARANCE_BOAT, + VEHICLE_APPEARANCE_PLANE, }; // Or Weapon.h? @@ -311,6 +311,7 @@ public: static bool bAltDodoCheat; #endif static bool m_bDisableMouseSteering; + static bool bDisableRemoteDetonation; }; void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle); |