summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-07 00:01:48 +0200
committeraap <aap@papnet.eu>2020-06-07 00:01:59 +0200
commit5711159e684e0612739ee66d3cd7e4444c7dc72d (patch)
tree85b6b6eb77087268c3c0134561913833deef892c /src/weapons
parentfix (diff)
downloadre3-5711159e684e0612739ee66d3cd7e4444c7dc72d.tar
re3-5711159e684e0612739ee66d3cd7e4444c7dc72d.tar.gz
re3-5711159e684e0612739ee66d3cd7e4444c7dc72d.tar.bz2
re3-5711159e684e0612739ee66d3cd7e4444c7dc72d.tar.lz
re3-5711159e684e0612739ee66d3cd7e4444c7dc72d.tar.xz
re3-5711159e684e0612739ee66d3cd7e4444c7dc72d.tar.zst
re3-5711159e684e0612739ee66d3cd7e4444c7dc72d.zip
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/Weapon.cpp7
-rw-r--r--src/weapons/Weapon.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index acce142a..8aa3db39 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -387,7 +387,7 @@ CWeapon::Fire(CEntity *shooter, CVector *fireSource)
}
bool
-CWeapon::FireFromCar(CVehicle *shooter, bool left)
+CWeapon::FireFromCar(CVehicle *shooter, bool left, bool right)
{
ASSERT(shooter!=nil);
@@ -397,7 +397,7 @@ CWeapon::FireFromCar(CVehicle *shooter, bool left)
if ( m_nAmmoInClip <= 0 )
return false;
- if ( FireInstantHitFromCar(shooter, left) )
+ if ( FireInstantHitFromCar(shooter, left, right) )
{
DMAudio.PlayOneShot(shooter->m_audioEntityId, SOUND_WEAPON_SHOT_FIRED, 0.0f);
@@ -2021,8 +2021,9 @@ CWeapon::FireM16_1stPerson(CEntity *shooter)
}
bool
-CWeapon::FireInstantHitFromCar(CVehicle *shooter, bool left)
+CWeapon::FireInstantHitFromCar(CVehicle *shooter, bool left, bool right)
{
+// TODO(MIAMI): bikes
CWeaponInfo *info = GetInfo();
CVehicleModelInfo *modelInfo = shooter->GetModelInfo();
diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h
index b6ce2903..cb1d9835 100644
--- a/src/weapons/Weapon.h
+++ b/src/weapons/Weapon.h
@@ -37,7 +37,7 @@ public:
void Shutdown();
bool Fire (CEntity *shooter, CVector *fireSource);
- bool FireFromCar (CVehicle *shooter, bool left);
+ bool FireFromCar (CVehicle *shooter, bool left, bool right);
bool FireMelee (CEntity *shooter, CVector &fireSource);
bool FireInstantHit(CEntity *shooter, CVector *fireSource);
@@ -52,7 +52,7 @@ public:
bool FireAreaEffect (CEntity *shooter, CVector *fireSource);
bool FireSniper (CEntity *shooter);
bool FireM16_1stPerson (CEntity *shooter);
- bool FireInstantHitFromCar(CVehicle *shooter, bool left);
+ bool FireInstantHitFromCar(CVehicle *shooter, bool left, bool right);
static void DoDoomAiming (CEntity *shooter, CVector *source, CVector *target);
static void DoTankDoomAiming (CEntity *shooter, CEntity *driver, CVector *source, CVector *target);