mirror of
https://github.com/GTAmodding/re3.git
synced 2025-08-26 00:53:42 +02:00
Fix muzzleflash rotation
This commit is contained in:
@@ -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);
|
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() )
|
else if ( shooter == FindPlayerPed() && TheCamera.Cams[0].Using3rdPersonMouseCam() )
|
||||||
{
|
{
|
||||||
CVector src, trgt;
|
CVector src, trgt;
|
||||||
TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, 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;
|
CWorld::bIncludeDeadPeds = true;
|
||||||
ProcessLineOfSight(src, trgt,point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false);
|
ProcessLineOfSight(src, trgt,point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false);
|
||||||
CWorld::bIncludeDeadPeds = false;
|
CWorld::bIncludeDeadPeds = false;
|
||||||
|
Reference in New Issue
Block a user