summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-26 19:37:22 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-26 19:37:22 +0100
commit9fce8636b0aab31343b708324abb0be70ddf5b25 (patch)
tree579afaa51f11d15883cf2ec315c4adb20f5ab924
parentUhh, right (diff)
downloadre3-9fce8636b0aab31343b708324abb0be70ddf5b25.tar
re3-9fce8636b0aab31343b708324abb0be70ddf5b25.tar.gz
re3-9fce8636b0aab31343b708324abb0be70ddf5b25.tar.bz2
re3-9fce8636b0aab31343b708324abb0be70ddf5b25.tar.lz
re3-9fce8636b0aab31343b708324abb0be70ddf5b25.tar.xz
re3-9fce8636b0aab31343b708324abb0be70ddf5b25.tar.zst
re3-9fce8636b0aab31343b708324abb0be70ddf5b25.zip
-rw-r--r--src/weapons/Weapon.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index dab510be..b3909a08 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -578,12 +578,29 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource)
ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false);
}
+#ifdef FIX_BUGS
+ // fix muzzleflash rotation
+ heading = CGeneral::GetAngleBetweenPoints(fireSource->x, fireSource->y, target.x, target.y);
+ angle = DEGTORAD(heading);
+
+ ahead = CVector2D(-Sin(angle), Cos(angle));
+ ahead.Normalise();
+#endif
}
else if ( shooter == FindPlayerPed() && TheCamera.Cams[0].Using3rdPersonMouseCam() )
{
CVector src, trgt;
TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, src, trgt);
+#ifdef FIX_BUGS
+ // fix muzzleflash rotation
+ heading = CGeneral::GetAngleBetweenPoints(src.x, src.y, trgt.x, trgt.y);
+ angle = DEGTORAD(heading);
+
+ ahead = CVector2D(-Sin(angle), Cos(angle));
+ ahead.Normalise();
+#endif
+
CWorld::bIncludeDeadPeds = true;
ProcessLineOfSight(src, trgt,point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false);
CWorld::bIncludeDeadPeds = false;