summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-20 21:44:31 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-20 21:44:31 +0200
commitd6a853bd60441eb2722389840256b576778185ca (patch)
treed6c3f4d17e9010834447d47fca0b563e57e625d6 /src/peds
parentducking & anim fix (diff)
downloadre3-d6a853bd60441eb2722389840256b576778185ca.tar
re3-d6a853bd60441eb2722389840256b576778185ca.tar.gz
re3-d6a853bd60441eb2722389840256b576778185ca.tar.bz2
re3-d6a853bd60441eb2722389840256b576778185ca.tar.lz
re3-d6a853bd60441eb2722389840256b576778185ca.tar.xz
re3-d6a853bd60441eb2722389840256b576778185ca.tar.zst
re3-d6a853bd60441eb2722389840256b576778185ca.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 8f7e02b7..c3c4f864 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -4069,7 +4069,8 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
bool willLinger = false;
int random;
- // TODO(Miami): PlayerInfo thingies here
+ if (damagedBy == FindPlayerPed() && damagedBy != this && damage > 3.0f)
+ ++CWorld::Players[CWorld::PlayerInFocus].m_nHavocLevel;
if (player == this) {
if (!player->m_bCanBeDamaged)
@@ -4535,11 +4536,11 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
m_pMyVehicle->SetStatus(STATUS_ABANDONED);
}
SetDie(dieAnim, dieDelta, dieSpeed);
- /*
+
if (damagedBy == FindPlayerPed() && damagedBy != this) {
- // TODO(Miami): PlayerInfo stuff
+ CWorld::Players[CWorld::PlayerInFocus].m_nHavocLevel += 10;
+ CWorld::Players[CWorld::PlayerInFocus].m_fMediaAttention += 5.f;
}
- */
}
}
for (int i = 0; i < ARRAY_SIZE(pVehicle->pPassengers); i++) {
@@ -4575,9 +4576,9 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
SetDie(dieAnim, dieDelta, dieSpeed);
if (damagedBy == player || damagedBy && damagedBy == FindPlayerVehicle()) {
-
- // TODO(Miami): PlayerInfo stuff
CDarkel::RegisterKillByPlayer(this, method, headShot);
+ CWorld::Players[CWorld::PlayerInFocus].m_nHavocLevel += 10;
+ CWorld::Players[CWorld::PlayerInFocus].m_fMediaAttention += 5.f;
m_threatEntity = player;
} else {
CDarkel::RegisterKillNotByPlayer(this, method);