summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-08-13 22:39:55 +0200
committereray orçunus <erayorcunus@gmail.com>2020-08-14 00:14:04 +0200
commitb54bb62c944f8f3e8d85501fbb762915fdc6569b (patch)
tree94ed5d0f70006246329d852127feea87f610ccba /src/weapons
parentfixes to HUD and sprite2d (diff)
downloadre3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.gz
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.bz2
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.lz
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.xz
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.zst
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.zip
Diffstat (limited to '')
-rw-r--r--src/weapons/BulletInfo.cpp2
-rw-r--r--src/weapons/Weapon.cpp15
2 files changed, 7 insertions, 10 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp
index 41d9c730..0efe6688 100644
--- a/src/weapons/BulletInfo.cpp
+++ b/src/weapons/BulletInfo.cpp
@@ -113,7 +113,7 @@ void CBulletInfo::Update(void)
CEntity* pHitEntity;
if (CWorld::ProcessLineOfSight(vecOldPos, vecNewPos, point, pHitEntity, true, true, true, true, true, false, false, true)) {
if (pBullet->m_pSource && (pHitEntity->IsPed() || pHitEntity->IsVehicle()))
- CStats::InstantHitsHitByPlayer++;
+ CStats::BulletsThatHit++;
CWeapon::CheckForShootingVehicleOccupant(&pHitEntity, &point, pBullet->m_eWeaponType, vecOldPos, vecNewPos);
if (pHitEntity->IsPed()) {
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,