diff options
author | Sergeanur <s.anureev@yandex.ua> | 2019-10-07 23:29:30 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2019-10-08 16:13:23 +0200 |
commit | 69963cea68b3057c0e590e30ee438dff801a4d07 (patch) | |
tree | 72a25c528dcab00922643b6b820703226b8a6d82 /src/peds/PlayerPed.cpp | |
parent | Fixed crash when aboarding train (diff) | |
download | re3-69963cea68b3057c0e590e30ee438dff801a4d07.tar re3-69963cea68b3057c0e590e30ee438dff801a4d07.tar.gz re3-69963cea68b3057c0e590e30ee438dff801a4d07.tar.bz2 re3-69963cea68b3057c0e590e30ee438dff801a4d07.tar.lz re3-69963cea68b3057c0e590e30ee438dff801a4d07.tar.xz re3-69963cea68b3057c0e590e30ee438dff801a4d07.tar.zst re3-69963cea68b3057c0e590e30ee438dff801a4d07.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/PlayerPed.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 668a6011..55906c38 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -4,6 +4,7 @@ #include "Camera.h" #include "WeaponEffects.h" #include "ModelIndices.h" +#include "World.h" CPlayerPed::~CPlayerPed() { @@ -103,6 +104,15 @@ CPlayerPed::ClearAdrenaline(void) } } +CPlayerInfo *
+CPlayerPed::GetPlayerInfoForThisPlayerPed()
+{
+ if (CWorld::Players[0].m_pPed == this)
+ return &CWorld::Players[0];
+
+ return nil;
+} + class CPlayerPed_ : public CPlayerPed { public: @@ -115,4 +125,5 @@ STARTPATCHES InjectHook(0x4EFB30, &CPlayerPed_::dtor, PATCH_JUMP); InjectHook(0x4F28A0, &CPlayerPed::ClearWeaponTarget, PATCH_JUMP); InjectHook(0x4F3700, &CPlayerPed::AnnoyPlayerPed, PATCH_JUMP); + InjectHook(0x4F36C0, &CPlayerPed::GetPlayerInfoForThisPlayerPed, PATCH_JUMP); ENDPATCHES |