summaryrefslogtreecommitdiffstats
path: root/src/entities/PlayerPed.cpp
diff options
context:
space:
mode:
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