summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-01 13:00:16 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-01 13:00:16 +0200
commit2b99f2634b7c75401cf1305929530467595919ca (patch)
tree1a4203b9e9b4c709686f82f4681364ddce217907 /src/weapons
parentmove debug script stuff to a separate file (diff)
parentFix radio scroll when player controls disabled (diff)
downloadre3-2b99f2634b7c75401cf1305929530467595919ca.tar
re3-2b99f2634b7c75401cf1305929530467595919ca.tar.gz
re3-2b99f2634b7c75401cf1305929530467595919ca.tar.bz2
re3-2b99f2634b7c75401cf1305929530467595919ca.tar.lz
re3-2b99f2634b7c75401cf1305929530467595919ca.tar.xz
re3-2b99f2634b7c75401cf1305929530467595919ca.tar.zst
re3-2b99f2634b7c75401cf1305929530467595919ca.zip
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/Weapon.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index 6f0e9094..6eab1a65 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -592,6 +592,16 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource)
{
CVector src, trgt;
TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, src, trgt);
+#ifdef FREE_CAM
+ CPed *shooterPed = (CPed *)shooter;
+ if((shooterPed->m_pedIK.m_flags & CPedIK::GUN_POINTED_SUCCESSFULLY) == 0) {
+ trgt.x = info->m_fRange;
+ trgt.y = 0.0f;
+ trgt.z = 0.0f;
+
+ shooterPed->TransformToNode(trgt, PED_HANDR);
+ }
+#endif
#ifdef FIX_BUGS
// fix muzzleflash rotation