diff options
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/Ped.cpp | 16 | ||||
-rw-r--r-- | src/peds/Ped.h | 6 | ||||
-rw-r--r-- | src/peds/PlayerPed.cpp | 16 |
3 files changed, 18 insertions, 20 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 47934a24..924098bc 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -3419,11 +3419,11 @@ CPed::InflictDamage(CEntity* damagedBy, eWeaponType method, float damage, ePedPi willLinger = false; } else { switch (pedPiece) { - case PEDPIECE_NONE: + case PEDPIECE_TORSO: willLinger = false; dieAnim = ANIM_KO_SHOT_FRONT1; break; - case PEDPIECE_BODY: + case PEDPIECE_MID: willLinger = false; dieAnim = ANIM_KO_SHOT_STOM; break; @@ -3518,9 +3518,9 @@ CPed::InflictDamage(CEntity* damagedBy, eWeaponType method, float damage, ePedPi switch (random) { case 0: if ((pedPiece != PEDPIECE_LEFTARM || random <= 1) - && (pedPiece != PEDPIECE_BODY || random != 1)) { + && (pedPiece != PEDPIECE_MID || random != 1)) { if (pedPiece == PEDPIECE_RIGHTARM && random > 1 - || pedPiece == PEDPIECE_BODY && random == 2) + || pedPiece == PEDPIECE_MID && random == 2) dieAnim = ANIM_KO_SPIN_L; else @@ -3537,9 +3537,9 @@ CPed::InflictDamage(CEntity* damagedBy, eWeaponType method, float damage, ePedPi break; case 2: if ((pedPiece != PEDPIECE_LEFTARM || random <= 1) - && (pedPiece != PEDPIECE_BODY || random != 1)) { + && (pedPiece != PEDPIECE_MID || random != 1)) { if ((pedPiece != PEDPIECE_RIGHTARM || random <= 1) - && (pedPiece != PEDPIECE_BODY || random != 2)) { + && (pedPiece != PEDPIECE_MID || random != 2)) { dieAnim = ANIM_KO_SKID_BACK; } else { dieAnim = ANIM_KD_RIGHT; @@ -3697,12 +3697,12 @@ CPed::SetGetUp(void) m_ped_flagE20 = false; if (IsPlayer()) - InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, CTimer::GetTimeStep(), PEDPIECE_NONE, 0); + InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, CTimer::GetTimeStep(), PEDPIECE_TORSO, 0); else { if (!CPad::GetPad(0)->ArePlayerControlsDisabled()) return; - InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, 1000.0f, PEDPIECE_NONE, 0); + InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, 1000.0f, PEDPIECE_TORSO, 0); } return; } diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 778a5b48..9f1858b4 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -15,8 +15,8 @@ struct CPathNode; enum ePedPieceTypes { - PEDPIECE_NONE, - PEDPIECE_BODY, + PEDPIECE_TORSO, + PEDPIECE_MID, PEDPIECE_LEFTARM, PEDPIECE_RIGHTARM, PEDPIECE_LEFTLEG, @@ -260,7 +260,7 @@ public: uint8 m_ped_flagH80 : 1; uint8 m_ped_flagI1 : 1; - uint8 m_ped_flagI2 : 1; // limbs won't be removed if set + uint8 m_ped_flagI2 : 1; // if set, limbs won't came off uint8 m_ped_flagI4 : 1; uint8 bHasAlreadyBeenRecorded : 1; uint8 m_ped_flagI10 : 1; diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index d2bc494f..24eb4a35 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -38,25 +38,23 @@ CPlayerPed::SetWantedLevelNoDrop(int32 level) m_pWanted->SetWantedLevelNoDrop(level); } -// I don't know actual purpose of parameter +// I don't know the actual purpose of parameter void CPlayerPed::AnnoyPlayerPed(bool itsPolice) { - int8 *temper = &m_pedStats->m_temper; - if (*temper >= 52) { + if (m_pedStats->m_temper < 52) { + m_pedStats->m_temper++; + } else { if (itsPolice) { - if (*temper < 55) { - (*temper)++; + if (m_pedStats->m_temper < 55) { + m_pedStats->m_temper++; } else { - (*temper) = 46; + m_pedStats->m_temper = 46; } } - } else { - (*temper)++; } } - class CPlayerPed_ : public CPlayerPed { public: |