mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 15:40:00 +00:00
fight fix
This commit is contained in:
parent
c63de7ec43
commit
dae2d30d8f
|
@ -4588,14 +4588,14 @@ CPed::FightStrike(CVector &touchedNodePos)
|
||||||
|
|
||||||
// He can beat us
|
// He can beat us
|
||||||
if (sq(maxDistanceToBeBeaten) > potentialAttackDistance.MagnitudeSqr()) {
|
if (sq(maxDistanceToBeBeaten) > potentialAttackDistance.MagnitudeSqr()) {
|
||||||
ourCol = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel();
|
ourCol = ((CPedModelInfo*)CModelInfo::GetModelInfo(m_modelIndex))->GetHitColModel();
|
||||||
if (nearPed->m_nPedState == PED_FALL
|
if (nearPed->m_nPedState == PED_FALL
|
||||||
|| nearPed->m_nPedState == PED_DEAD || nearPed->m_nPedState == PED_DIE
|
|| nearPed->m_nPedState == PED_DEAD || nearPed->m_nPedState == PED_DIE
|
||||||
|| !nearPed->IsPedHeadAbovePos(-0.3f)) {
|
|| !nearPed->IsPedHeadAbovePos(-0.3f)) {
|
||||||
ourCol = &CTempColModels::ms_colModelPedGroundHit;
|
ourCol = &CTempColModels::ms_colModelPedGroundHit;
|
||||||
}
|
}
|
||||||
for (int j = 0; j < ourCol->numSpheres; j++) {
|
for (int j = 0; j < ourCol->numSpheres; j++) {
|
||||||
attackDistance = nearPed->GetPosition() - ourCol->spheres[j].center;
|
attackDistance = nearPed->GetPosition() + ourCol->spheres[j].center;
|
||||||
attackDistance -= touchedNodePos;
|
attackDistance -= touchedNodePos;
|
||||||
CColSphere *ourPieces = ourCol->spheres;
|
CColSphere *ourPieces = ourCol->spheres;
|
||||||
float maxDistanceToBeat = ourPieces[j].radius + ms_fightMoves[m_lastFightMove].strikeRadius;
|
float maxDistanceToBeat = ourPieces[j].radius + ms_fightMoves[m_lastFightMove].strikeRadius;
|
||||||
|
|
Loading…
Reference in a new issue