diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-06 16:19:36 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-06 16:19:36 +0200 |
commit | 4e4a3489ef7d961b94e956309c36476f1baac9c0 (patch) | |
tree | 799670c55575506915f906be6b818028f5b7d50d /src/weapons | |
parent | bla (diff) | |
download | re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.tar re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.tar.gz re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.tar.bz2 re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.tar.lz re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.tar.xz re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.tar.zst re3-4e4a3489ef7d961b94e956309c36476f1baac9c0.zip |
Diffstat (limited to 'src/weapons')
-rw-r--r-- | src/weapons/Weapon.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 114a2240..acce142a 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -31,6 +31,7 @@ #include "WeaponInfo.h" #include "World.h" #include "SurfaceTable.h" +#include "Bike.h" // TODO(Miami) #define AUDIO_NOT_READY @@ -524,7 +525,22 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) } damageEntityRegistered = 3; - // TODO(Miami): Bike + if (victimPed->bInVehicle) { + CVehicle *victimVeh = victimPed->m_pMyVehicle; + if (victimVeh) { + if (victimVeh->IsBike()) { + CBike *victimBike = (CBike*)victimVeh; + victimBike->KnockOffRider(m_eWeaponType, localDir, victimPed, false); + if (victimBike->pDriver) { + victimBike->pDriver->ReactToAttack(shooterPed); + } else { + if (victimVeh->pPassengers[0]) + victimVeh->pPassengers[0]->ReactToAttack(shooterPed); + } + continue; + } + } + } if ( !victimPed->DyingOrDead() ) victimPed->ReactToAttack(shooterPed); |