From 0625954bb74e687ed73b496bc06e9db58407e045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sat, 20 Jun 2020 16:23:32 +0300 Subject: Ducking, shooting vehicle occupants and weapon fixes --- src/peds/Ped.cpp | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'src/peds/Ped.cpp') diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 4069301d..713806a2 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -1113,19 +1113,15 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg) newAnim->SetFinishCallback(FinishedAttackCB, ped); } } else { - if (attackAssoc && attackAssoc->animId == ANIM_MELEE_ATTACK && currentWeapon->m_AnimToPlay == ASSOCGRP_UNARMED) - { + if (attackAssoc && attackAssoc->animId == ANIM_MELEE_ATTACK && currentWeapon->m_AnimToPlay == ASSOCGRP_UNARMED) { attackAssoc->blendDelta = -8.0f; attackAssoc->flags |= ASSOC_DELETEFADEDOUT; ped->ClearAttack(); return; } - if (attackAssoc) - { - if (currentWeapon->m_AnimToPlay == ASSOCGRP_THROW) - { - if ((attackAssoc->animId == ANIM_THROWABLE_THROW || attackAssoc->animId == ANIM_THROWABLE_THROWU) && ped->GetWeapon()->m_nAmmoTotal > 0) - { + if (attackAssoc) { + if (currentWeapon->m_AnimToPlay == ASSOCGRP_THROW) { + if ((attackAssoc->animId == ANIM_THROWABLE_THROW || attackAssoc->animId == ANIM_THROWABLE_THROWU) && ped->GetWeapon()->m_nAmmoTotal > 0) { ped->RemoveWeaponModel(currentWeapon->m_nModelId); ped->AddWeaponModel(currentWeapon->m_nModelId); } @@ -1661,7 +1657,6 @@ CPed::ClearDuck(bool clearTimer) if (!animAssoc) { animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW); } - if (!animAssoc) { animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH); } @@ -6808,30 +6803,6 @@ CPed::Die(void) // UNUSED: This is a perfectly empty function. } -uint8 -CPed::DoesLOSBulletHitPed(CColPoint &colPoint) -{ -#ifdef FIX_BUGS - return 1; -#else - uint8 retVal = 2; - - float headZ = GetNodePosition(PED_HEAD).z; - - if (m_nPedState == PED_FALL) - retVal = 1; - - float colZ = colPoint.point.z; - if (colZ < headZ) - retVal = 1; - - if (headZ + 0.2f <= colZ) - retVal = 0; - - return retVal; -#endif -} - // --MIAMI: Done bool CPed::DuckAndCover(void) -- cgit v1.2.3