mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 12:00:01 +00:00
Fix not being able to hit lying peds with melee weapon
This commit is contained in:
parent
441b3864f3
commit
99a3fe0a13
|
@ -821,7 +821,7 @@ CPed::Attack(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float animStart = ourWeapon->m_fAnimLoopStart * 0.4f;
|
float animStart = animLoopStart * 0.4f;
|
||||||
weaponAnimTime = weaponAnimAssoc->currentTime;
|
weaponAnimTime = weaponAnimAssoc->currentTime;
|
||||||
if (weaponAnimTime > animStart && weaponAnimTime - weaponAnimAssoc->timeStep <= animStart) {
|
if (weaponAnimTime > animStart && weaponAnimTime - weaponAnimAssoc->timeStep <= animStart) {
|
||||||
if (!bIsDucking && !(m_nPedType == PEDTYPE_COP && ourWeapon->m_bCop3rd && weaponAnimAssoc->animId == ANIM_WEAPON_FIRE_3RD) && ourWeapon->m_bCanAimWithArm)
|
if (!bIsDucking && !(m_nPedType == PEDTYPE_COP && ourWeapon->m_bCop3rd && weaponAnimAssoc->animId == ANIM_WEAPON_FIRE_3RD) && ourWeapon->m_bCanAimWithArm)
|
||||||
|
@ -843,7 +843,7 @@ CPed::Attack(void)
|
||||||
} else {
|
} else {
|
||||||
firePos = ourWeapon->m_vecFireOffset;
|
firePos = ourWeapon->m_vecFireOffset;
|
||||||
|
|
||||||
if (ourWeaponType != WEAPONTYPE_KATANA && ourWeaponType != WEAPONTYPE_CHAINSAW) {
|
if(ourWeapon->m_AnimToPlay != ASSOCGRP_BASEBALLBAT && ourWeapon->m_AnimToPlay != ASSOCGRP_GOLFCLUB) {
|
||||||
if (ourWeapon->m_eWeaponFire != WEAPON_FIRE_MELEE) {
|
if (ourWeapon->m_eWeaponFire != WEAPON_FIRE_MELEE) {
|
||||||
TransformToNode(firePos, (weaponAnimAssoc->animId == ANIM_MELEE_ATTACK_2ND && ourWeapon->m_AnimToPlay == ASSOCGRP_UNARMED) ? PED_FOOTR : PED_HANDR);
|
TransformToNode(firePos, (weaponAnimAssoc->animId == ANIM_MELEE_ATTACK_2ND && ourWeapon->m_AnimToPlay == ASSOCGRP_UNARMED) ? PED_FOOTR : PED_HANDR);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue