summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-26 08:52:39 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-26 08:52:39 +0200
commit250727c9ca75292e5404d31f08e21146e7ad43b6 (patch)
tree15c21b1f8a5759a23abd7c56b7065417575f1955
parentRemove deceiving comment (diff)
downloadre3-250727c9ca75292e5404d31f08e21146e7ad43b6.tar
re3-250727c9ca75292e5404d31f08e21146e7ad43b6.tar.gz
re3-250727c9ca75292e5404d31f08e21146e7ad43b6.tar.bz2
re3-250727c9ca75292e5404d31f08e21146e7ad43b6.tar.lz
re3-250727c9ca75292e5404d31f08e21146e7ad43b6.tar.xz
re3-250727c9ca75292e5404d31f08e21146e7ad43b6.tar.zst
re3-250727c9ca75292e5404d31f08e21146e7ad43b6.zip
-rw-r--r--src/weapons/Weapon.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index 4fba3c67..8328067f 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -932,6 +932,14 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource)
ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, false, false);
CWorld::bIncludeBikers = false;
}
+#ifdef FIX_BUGS
+ // fix muzzleflash rotation
+ heading = CGeneral::GetAngleBetweenPoints(source.x, source.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() )
{
@@ -947,6 +955,14 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource)
}
#endif
+#ifdef FIX_BUGS
+ // fix muzzleflash rotation
+ heading = CGeneral::GetAngleBetweenPoints(source.x, source.y, target.x, target.y);
+ angle = DEGTORAD(heading);
+
+ ahead = CVector2D(-Sin(angle), Cos(angle));
+ ahead.Normalise();
+#endif
CWorld::bIncludeBikers = true;
CWorld::bIncludeDeadPeds = true;
CWorld::bIncludeCarTyres = true;