diff options
Diffstat (limited to 'src/peds/PlayerPed.cpp')
-rw-r--r-- | src/peds/PlayerPed.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 74db3055..c84ed4b4 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -1159,6 +1159,7 @@ void CPlayerPed::ProcessAnimGroups(void) { AssocGroupId groupToSet; +#ifdef PC_PLAYER_CONTROLS if ((m_fWalkAngle <= -DEGTORAD(50.0f) || m_fWalkAngle >= DEGTORAD(50.0f)) && TheCamera.Cams[TheCamera.ActiveCam].Using3rdPersonMouseCam() && CanStrafeOrMouseControl()) { @@ -1193,7 +1194,9 @@ CPlayerPed::ProcessAnimGroups(void) else groupToSet = ASSOCGRP_PLAYERBACK; } - } else { + } else +#endif + { if (GetWeapon()->m_eWeaponType == WEAPONTYPE_ROCKETLAUNCHER) { groupToSet = ASSOCGRP_PLAYERROCKET; } else { @@ -1331,7 +1334,9 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) #ifdef FREE_CAM static int8 changedHeadingRate = 0; + static int8 pointedGun = 0; if (changedHeadingRate == 2) changedHeadingRate = 1; + if (pointedGun == 2) pointedGun = 1; // Rotate player/arm when shooting. We don't have auto-rotation anymore if (CCamera::m_bUseMouse3rdPerson && CCamera::bFreeCam && @@ -1346,14 +1351,14 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) // On this one we can rotate arm. if (CAN_AIM_WITH_ARM) { if (!padUsed->GetWeapon()) { // making this State != ATTACK still stops it after attack. Re-start it immediately! - SetWeaponLockOnTarget(nil); + SetPointGunAt(nil); bIsPointingGunAt = false; // to not stop after attack } - + pointedGun = 2; SetLookFlag(limitedCam, true); SetAimFlag(limitedCam); SetLookTimer(INT32_MAX); // removing this makes head move for real, but I experinced some bugs. - + } else { m_fRotationDest = limitedCam; changedHeadingRate = 2; @@ -1373,8 +1378,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) m_fRotationCur += (limitedRotDest - m_fRotationCur) / 2; } } - } else if (CAN_AIM_WITH_ARM && m_nPedState != PED_ATTACK) - ClearPointGunAt(); + } } #undef CAN_AIM_WITH_ARM } @@ -1382,6 +1386,10 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) changedHeadingRate = 0; RestoreHeadingRate(); } + if (pointedGun == 1 && m_nPedState != PED_ATTACK) { + pointedGun = 0; + ClearPointGunAt(); + } #endif if (padUsed->GetTarget() && m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT && !TheCamera.Using1stPersonWeaponMode() && weaponInfo->m_bCanAim) { |