summaryrefslogtreecommitdiffstats
path: root/src/weapons/Weapon.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-08-16 13:46:20 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-08-16 13:46:20 +0200
commit7669b97ac64bd77dc0932210f81e4a0def9bfb1b (patch)
tree51c7580701ea00abc769e68d14a83a25b8ebd0cf /src/weapons/Weapon.cpp
parentsubmodule (diff)
parentMerge branch 'master' into miami (diff)
downloadre3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.gz
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.bz2
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.lz
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.xz
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.zst
re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.zip
Diffstat (limited to 'src/weapons/Weapon.cpp')
-rw-r--r--src/weapons/Weapon.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index 8e7e4265..0cd439c2 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -1466,20 +1466,20 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
}
case ENTITY_TYPE_VEHICLE:
{
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
DMAudio.PlayOneShot(((CPhysical*)victim)->m_audioEntityId, SOUND_WEAPON_HIT_VEHICLE, 1.0f);
break;
}
case ENTITY_TYPE_PED:
{
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
DMAudio.PlayOneShot(((CPhysical*)victim)->m_audioEntityId, SOUND_WEAPON_HIT_PED, 1.0f);
((CPed*)victim)->Say(SOUND_PED_BULLET_HIT);
break;
}
case ENTITY_TYPE_OBJECT:
{
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
PlayOneShotScriptObject(SCRIPT_SOUND_BULLET_HIT_GROUND_2, point->point);
break;
}
@@ -1862,7 +1862,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
case ENTITY_TYPE_VEHICLE:
{
if (!statUpdated) {
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
statUpdated = true;
}
DMAudio.PlayOneShot(((CPhysical*)victim)->m_audioEntityId, SOUND_WEAPON_HIT_VEHICLE, 1.0f);
@@ -1871,7 +1871,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
case ENTITY_TYPE_PED:
{
if (!statUpdated) {
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
statUpdated = true;
}
DMAudio.PlayOneShot(((CPhysical*)victim)->m_audioEntityId, SOUND_WEAPON_HIT_PED, 1.0f);
@@ -1881,7 +1881,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
case ENTITY_TYPE_OBJECT:
{
if (!statUpdated) {
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
statUpdated = true;
}
PlayOneShotScriptObject(SCRIPT_SOUND_BULLET_HIT_GROUND_2, point.point);
@@ -2071,9 +2071,6 @@ CWeapon::FireSniper(CEntity *shooter)
CBulletInfo::AddBullet(shooter, m_eWeaponType, source, dir);
if ( shooter == FindPlayerPed() )
- CStats::InstantHitsFiredByPlayer++;
-
- if ( shooter == FindPlayerPed() )
{
CPad::GetPad(0)->StartShake_Distance(240, 128,
FindPlayerPed()->GetPosition().x,