Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix smooth spray when shooting with colt or usi while using PC controls
- Loading branch information
Showing
with
14 additions
and
0 deletions.
-
+3
−0
src/peds/Ped.cpp
-
+11
−0
src/peds/PlayerPed.cpp
There are no files selected for viewing
|
|
@@ -1348,6 +1348,9 @@ CPed::CalculateNewVelocity(void) |
|
limitedRotDest -= 2 * PI;
|
|
limitedRotDest -= 2 * PI;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#ifdef FREE_CAM
|
|
|
|
if (!TheCamera.Cams[0].Using3rdPersonMouseCam())
|
|
|
|
#endif
|
|
if (IsPlayer() && m_nPedState == PED_ATTACK)
|
|
if (IsPlayer() && m_nPedState == PED_ATTACK)
|
|
headAmount /= 4.0f;
|
|
headAmount /= 4.0f;
|
|
|
|
|
|
|
|
|
|
@@ -503,6 +503,10 @@ CPlayerPed::DoWeaponSmoothSpray(void) |
|
{
|
|
{
|
|
if (m_nPedState == PED_ATTACK && !m_pPointGunAt) {
|
|
if (m_nPedState == PED_ATTACK && !m_pPointGunAt) {
|
|
eWeaponType weapon = GetWeapon()->m_eWeaponType;
|
|
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 ||
|
|
if (weapon == WEAPONTYPE_FLAMETHROWER || weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI || weapon == WEAPONTYPE_SHOTGUN ||
|
|
weapon == WEAPONTYPE_AK47 || weapon == WEAPONTYPE_M16 || weapon == WEAPONTYPE_HELICANNON)
|
|
weapon == WEAPONTYPE_AK47 || weapon == WEAPONTYPE_M16 || weapon == WEAPONTYPE_HELICANNON)
|
|
return true;
|
|
return true;
|
|
|
@@ -1183,6 +1187,13 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed) |
|
padMoveInGameUnit = CVector2D(leftRight, upDown).Magnitude() / PAD_MOVE_TO_GAME_WORLD_MOVE;
|
|
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) {
|
|
if (padMoveInGameUnit > 0.0f || smoothSprayWithoutMove) {
|
|
float padHeading = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown);
|
|
float padHeading = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown);
|
|
float neededTurn = CGeneral::LimitRadianAngle(padHeading - camOrientation);
|
|
float neededTurn = CGeneral::LimitRadianAngle(padHeading - camOrientation);
|
|
|
|
This comment has been minimized.
bc3734cFinally! @erorcun :)