mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 02:19:01 +00:00
Fix smooth spray when shooting with colt or usi while using PC controls
This commit is contained in:
parent
cafc0f3c10
commit
bc3734cae3
2 changed files with 14 additions and 0 deletions
|
@ -1348,6 +1348,9 @@ CPed::CalculateNewVelocity(void)
|
|||
limitedRotDest -= 2 * PI;
|
||||
}
|
||||
|
||||
#ifdef FREE_CAM
|
||||
if (!TheCamera.Cams[0].Using3rdPersonMouseCam())
|
||||
#endif
|
||||
if (IsPlayer() && m_nPedState == PED_ATTACK)
|
||||
headAmount /= 4.0f;
|
||||
|
||||
|
|
|
@ -503,6 +503,10 @@ CPlayerPed::DoWeaponSmoothSpray(void)
|
|||
{
|
||||
if (m_nPedState == PED_ATTACK && !m_pPointGunAt) {
|
||||
eWeaponType weapon = GetWeapon()->m_eWeaponType;
|
||||
#ifdef FREE_CAM
|
||||
if(TheCamera.Cams[0].Using3rdPersonMouseCam() && (weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI))
|
||||
return false;
|
||||
#endif
|
||||
if (weapon == WEAPONTYPE_FLAMETHROWER || weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI || weapon == WEAPONTYPE_SHOTGUN ||
|
||||
weapon == WEAPONTYPE_AK47 || weapon == WEAPONTYPE_M16 || weapon == WEAPONTYPE_HELICANNON)
|
||||
return true;
|
||||
|
@ -1183,6 +1187,13 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed)
|
|||
padMoveInGameUnit = CVector2D(leftRight, upDown).Magnitude() / PAD_MOVE_TO_GAME_WORLD_MOVE;
|
||||
}
|
||||
|
||||
#ifdef FREE_CAM
|
||||
if(TheCamera.Cams[0].Using3rdPersonMouseCam() && doSmoothSpray) {
|
||||
padMoveInGameUnit = 0.0f;
|
||||
smoothSprayWithoutMove = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (padMoveInGameUnit > 0.0f || smoothSprayWithoutMove) {
|
||||
float padHeading = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown);
|
||||
float neededTurn = CGeneral::LimitRadianAngle(padHeading - camOrientation);
|
||||
|
|
Loading…
Reference in a new issue