summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-26 12:39:56 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-26 12:39:56 +0200
commitdae2d30d8f6dc9cf4831c1e9df59a42cecfccecf (patch)
tree11a72d636246b0665b7a8d6ea40e83d6d56c5bb0 /src/peds/Ped.cpp
parentMerge pull request #164 from Nick007J/master (diff)
downloadre3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.tar
re3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.tar.gz
re3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.tar.bz2
re3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.tar.lz
re3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.tar.xz
re3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.tar.zst
re3-dae2d30d8f6dc9cf4831c1e9df59a42cecfccecf.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index fb9b778f..1972396c 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -4588,14 +4588,14 @@ CPed::FightStrike(CVector &touchedNodePos)
// He can beat us
if (sq(maxDistanceToBeBeaten) > potentialAttackDistance.MagnitudeSqr()) {
- ourCol = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel();
+ ourCol = ((CPedModelInfo*)CModelInfo::GetModelInfo(m_modelIndex))->GetHitColModel();
if (nearPed->m_nPedState == PED_FALL
|| nearPed->m_nPedState == PED_DEAD || nearPed->m_nPedState == PED_DIE
|| !nearPed->IsPedHeadAbovePos(-0.3f)) {
ourCol = &CTempColModels::ms_colModelPedGroundHit;
}
for (int j = 0; j < ourCol->numSpheres; j++) {
- attackDistance = nearPed->GetPosition() - ourCol->spheres[j].center;
+ attackDistance = nearPed->GetPosition() + ourCol->spheres[j].center;
attackDistance -= touchedNodePos;
CColSphere *ourPieces = ourCol->spheres;
float maxDistanceToBeat = ourPieces[j].radius + ms_fightMoves[m_lastFightMove].strikeRadius;