diff options
author | aap <aap@papnet.eu> | 2020-12-21 12:34:36 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-21 12:34:36 +0100 |
commit | f251803f558e5f4d434f78b70c9c24acf00a83ad (patch) | |
tree | c43b6df0ba0b5ea0c449c73806d09530a67b81b3 /src/peds/PedAI.cpp | |
parent | push/pop memids (diff) | |
parent | Fix wrong call on free cam (now it's faster) (diff) | |
download | re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.tar re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.tar.gz re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.tar.bz2 re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.tar.lz re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.tar.xz re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.tar.zst re3-f251803f558e5f4d434f78b70c9c24acf00a83ad.zip |
Diffstat (limited to 'src/peds/PedAI.cpp')
-rw-r--r-- | src/peds/PedAI.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index d5705a2f..364e18d8 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -5899,17 +5899,21 @@ CPed::Duck(void) ClearDuck(); else if (bIsDucking && bCrouchWhenShooting) { CWeaponInfo *weapon = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType); - CAnimBlendAssociation *attackAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH); - if (!attackAssoc) { + CAnimBlendAssociation *crouchAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH); + if (!crouchAnim) { if(GetCrouchFireAnim(weapon)) - attackAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weapon)); + crouchAnim = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weapon)); } - if (!attackAssoc) { + if (!crouchAnim) { if(GetCrouchReloadAnim(weapon)) - attackAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchReloadAnim(weapon)); + crouchAnim = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchReloadAnim(weapon)); } - if (!attackAssoc) { + if (!crouchAnim) { bIsDucking = false; +#if defined FIX_BUGS || defined FREE_CAM + if (IsPlayer()) + bCrouchWhenShooting = false; +#endif } } } |