diff options
Diffstat (limited to '')
-rw-r--r-- | src/weapons/Weapon.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h index c7685e0d..cb59582f 100644 --- a/src/weapons/Weapon.h +++ b/src/weapons/Weapon.h @@ -2,12 +2,13 @@ #include "WeaponType.h" -#define DRIVEBYAUTOAIMING_MAXDIST (2.5f) +#define CAR_DRIVEBYAUTOAIMING_MAXDIST (2.5f) #define DOOMAUTOAIMING_MAXDIST (9000.0f) class CEntity; class CPhysical; -class CAutomobile; +class CVehicle; +class CPed; struct CColPoint; class CWeaponInfo; @@ -24,6 +25,7 @@ public: CWeapon() { m_bAddRotOffset = false; } + CWeapon(eWeaponType type, int32 ammo); CWeaponInfo *GetInfo(); @@ -32,9 +34,10 @@ public: static void UpdateWeapons (void); void Initialise(eWeaponType type, int32 ammo); + void Shutdown(); bool Fire (CEntity *shooter, CVector *fireSource); - bool FireFromCar (CAutomobile *shooter, bool left); + bool FireFromCar (CVehicle *shooter, bool left, bool right); bool FireMelee (CEntity *shooter, CVector &fireSource); bool FireInstantHit(CEntity *shooter, CVector *fireSource); @@ -49,14 +52,14 @@ public: bool FireAreaEffect (CEntity *shooter, CVector *fireSource); bool FireSniper (CEntity *shooter); bool FireM16_1stPerson (CEntity *shooter); - bool FireInstantHitFromCar(CAutomobile *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); - static void DoDriveByAutoAiming(CEntity *shooter, CVector *source, CVector *target); + static void DoDriveByAutoAiming(CEntity *driver, CVehicle *vehicle, CVector *source, CVector *target); void Reload(void); - void Update(int32 audioEntity); + void Update(int32 audioEntity, CPed *pedToAdjustSound); bool IsTypeMelee (void); bool IsType2Handed(void); @@ -65,9 +68,15 @@ public: bool HitsGround(CEntity *holder, CVector *fireSource, CEntity *aimingTo); static void BlowUpExplosiveThings(CEntity *thing); bool HasWeaponAmmoToBeUsed(void); + static void AddGunFlashBigGuns(CVector, CVector); + static bool IsShotgun(int weapon) { return weapon == WEAPONTYPE_SHOTGUN || weapon == WEAPONTYPE_SPAS12_SHOTGUN || weapon == WEAPONTYPE_STUBBY_SHOTGUN; } + + // TODO(Miami): Is that still used? static bool ProcessLineOfSight(CVector const &point1, CVector const &point2, CColPoint &point, CEntity *&entity, eWeaponType type, CEntity *shooter, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects); + static void CheckForShootingVehicleOccupant(CEntity**, CColPoint*, eWeaponType, CVector const&, CVector const&); + #ifdef COMPATIBLE_SAVES void Save(uint8*& buf); void Load(uint8*& buf); |