From 93a4bc31fa767df0460d1e66e97f30c863cdc1bf Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Wed, 25 Mar 2020 22:57:34 +0100 Subject: added wrapper for InflictDamage() --- src/vehicles/Vehicle.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vehicles') diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 90848d6c..6aa12841 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -32,6 +32,7 @@ void CVehicle::operator delete(void *p, int handle) { CPools::GetVehiclePool()-> WRAPPER bool CVehicle::ShufflePassengersToMakeSpace(void) { EAXJMP(0x5528A0); } // or Weapon.cpp? WRAPPER void FireOneInstantHitRound(CVector *shotSource, CVector *shotTarget, int32 damage) { EAXJMP(0x563B00); } +WRAPPER void CVehicle::InflictDamage(CVehicle *damagedBy, uint32 weaponType, float damage) { EAXJMP(0x551950); } CVehicle::CVehicle(uint8 CreatedBy) { -- cgit v1.2.3 From be2aca47cfa84626ded8c140e5f8cf4af5f1a055 Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Wed, 25 Mar 2020 22:58:20 +0100 Subject: added InflictDamage() declaration --- src/vehicles/Vehicle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vehicles') diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index bd8df694..68b7b2ca 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -266,6 +266,7 @@ public: void ProcessCarAlarm(void); bool IsSphereTouchingVehicle(float sx, float sy, float sz, float radius); bool ShufflePassengersToMakeSpace(void); + void InflictDamage(CEntity *damagedBy, uint32 weaponType, float damage); bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1; } CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); } -- cgit v1.2.3 From 0e9101594031fb9468d639ab6e4b57449cd8997c Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Thu, 26 Mar 2020 14:19:55 +0100 Subject: Update Vehicle.cpp --- src/vehicles/Vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 6aa12841..ac0da52c 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -32,7 +32,7 @@ void CVehicle::operator delete(void *p, int handle) { CPools::GetVehiclePool()-> WRAPPER bool CVehicle::ShufflePassengersToMakeSpace(void) { EAXJMP(0x5528A0); } // or Weapon.cpp? WRAPPER void FireOneInstantHitRound(CVector *shotSource, CVector *shotTarget, int32 damage) { EAXJMP(0x563B00); } -WRAPPER void CVehicle::InflictDamage(CVehicle *damagedBy, uint32 weaponType, float damage) { EAXJMP(0x551950); } +WRAPPER void CVehicle::InflictDamage(CEntity *damagedBy, uint32 weaponType, float damage) { EAXJMP(0x551950); } CVehicle::CVehicle(uint8 CreatedBy) { -- cgit v1.2.3 From 739e80614db70f726c47180173ba19688bec5167 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 28 Mar 2020 09:37:04 +0100 Subject: remove include from common.h --- src/vehicles/Automobile.cpp | 2 ++ src/vehicles/Boat.cpp | 2 ++ src/vehicles/Heli.cpp | 1 + src/vehicles/Plane.cpp | 1 + src/vehicles/Train.cpp | 2 ++ 5 files changed, 8 insertions(+) (limited to 'src/vehicles') diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index a05a1236..44ff6b6d 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -4483,6 +4483,8 @@ CAutomobile::SetAllTaxiLights(bool set) m_sAllTaxiLights = set; } +#include + class CAutomobile_ : public CAutomobile { public: diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 7dbd7080..6d584017 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -299,6 +299,8 @@ CBoat::FillBoatList() } } +#include + class CBoat_ : public CBoat { public: diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index aab9dd0d..9fc50651 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -1034,6 +1034,7 @@ bool CHeli::HasCatalinaBeenShotDown(void) { return CatalinaHasBeenShotDown; } void CHeli::ActivateHeli(bool activate) { ScriptHeliOn = activate; } +#include class CHeli_ : public CHeli { diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index b4d80581..e44ff996 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -964,6 +964,7 @@ bool CPlane::HasCesnaLanded(void) { return CesnaMissionStatus == CESNA_STATUS_LA bool CPlane::HasCesnaBeenDestroyed(void) { return CesnaMissionStatus == CESNA_STATUS_DESTROYED; } bool CPlane::HasDropOffCesnaBeenShotDown(void) { return DropOffCesnaMissionStatus == CESNA_STATUS_DESTROYED; } +#include class CPlane_ : public CPlane { diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 1c73ed05..6446e6d1 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -691,6 +691,8 @@ CTrain::UpdateTrains(void) } } +#include + class CTrain_ : public CTrain { public: -- cgit v1.2.3