diff options
author | aap <aap@papnet.eu> | 2019-07-08 08:46:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-08 08:46:42 +0200 |
commit | 12af85ca3d29e155f40323ad07a77f96a4aececf (patch) | |
tree | 7a6d7c8ed51ec1c527903835bbe4ee39eef2ab8b /src/vehicles/Vehicle.cpp | |
parent | Merge pull request #111 from gennariarmando/master (diff) | |
download | re3-12af85ca3d29e155f40323ad07a77f96a4aececf.tar re3-12af85ca3d29e155f40323ad07a77f96a4aececf.tar.gz re3-12af85ca3d29e155f40323ad07a77f96a4aececf.tar.bz2 re3-12af85ca3d29e155f40323ad07a77f96a4aececf.tar.lz re3-12af85ca3d29e155f40323ad07a77f96a4aececf.tar.xz re3-12af85ca3d29e155f40323ad07a77f96a4aececf.tar.zst re3-12af85ca3d29e155f40323ad07a77f96a4aececf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Vehicle.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index dccd9195..1a22e98a 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -460,11 +460,22 @@ CVehicle::IsSphereTouchingVehicle(float sx, float sy, float sz, float radius) return true; } + +class CVehicle_ : public CVehicle +{ +public: + void dtor(void) { CVehicle::~CVehicle(); } + void SetModelIndex_(uint32 id) { CVehicle::SetModelIndex(id); } + bool SetupLighting_(void) { return CVehicle::SetupLighting(); } + void RemoveLighting_(bool reset) { CVehicle::RemoveLighting(reset); } + float GetHeightAboveRoad_(void) { return CVehicle::GetHeightAboveRoad(); } +}; + STARTPATCHES - InjectHook(0x551170, &CVehicle::SetModelIndex_, PATCH_JUMP); - InjectHook(0x4A7DD0, &CVehicle::SetupLighting_, PATCH_JUMP); - InjectHook(0x4A7E60, &CVehicle::RemoveLighting_, PATCH_JUMP); - InjectHook(0x417E60, &CVehicle::GetHeightAboveRoad_, PATCH_JUMP); + InjectHook(0x551170, &CVehicle_::SetModelIndex_, PATCH_JUMP); + InjectHook(0x4A7DD0, &CVehicle_::SetupLighting_, PATCH_JUMP); + InjectHook(0x4A7E60, &CVehicle_::RemoveLighting_, PATCH_JUMP); + InjectHook(0x417E60, &CVehicle_::GetHeightAboveRoad_, PATCH_JUMP); InjectHook(0x552880, &CVehicle::IsLawEnforcementVehicle, PATCH_JUMP); InjectHook(0x552820, &CVehicle::ChangeLawEnforcerState, PATCH_JUMP); |