summaryrefslogtreecommitdiffstats
path: root/src/entities/PlayerPed.cpp
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-07-04 22:31:21 +0200
committer_AG <gennariarmando@outlook.com>2019-07-04 22:33:19 +0200
commit9fed0c040c482bac8cba688e7564c8e8dfe23b30 (patch)
tree6098d16b702a3a057cd0bbd39bf3ece217c832c8 /src/entities/PlayerPed.cpp
parentMerge pull request #110 from erorcun/erorcun (diff)
downloadre3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.tar
re3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.tar.gz
re3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.tar.bz2
re3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.tar.lz
re3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.tar.xz
re3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.tar.zst
re3-9fed0c040c482bac8cba688e7564c8e8dfe23b30.zip
Diffstat (limited to '')
-rw-r--r--src/entities/PlayerPed.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/entities/PlayerPed.cpp b/src/entities/PlayerPed.cpp
index 2d67d5b2..7eb01db0 100644
--- a/src/entities/PlayerPed.cpp
+++ b/src/entities/PlayerPed.cpp
@@ -1,6 +1,8 @@
#include "common.h"
#include "patcher.h"
#include "PlayerPed.h"
+#include "Camera.h"
+#include "WeaponEffects.h"
CPlayerPed::~CPlayerPed()
{
@@ -9,6 +11,18 @@ CPlayerPed::~CPlayerPed()
WRAPPER void CPlayerPed::ReApplyMoveAnims(void) { EAXJMP(0x4F07C0); }
+void CPlayerPed::ClearWeaponTarget()
+{
+ if (!m_nPedType) {
+ m_pPointGunAt = 0;
+ TheCamera.ClearPlayerWeaponMode();
+ CWeaponEffects::ClearCrosshair();
+ }
+ ClearPointGunAt();
+}
+
STARTPATCHES
- InjectHook(0x4EFB30, &CPlayerPed::dtor, PATCH_JUMP);
+InjectHook(0x4EFB30, &CPlayerPed::dtor, PATCH_JUMP);
+InjectHook(0x4F28A0, &CPlayerPed::ClearWeaponTarget, PATCH_JUMP);
+
ENDPATCHES \ No newline at end of file