diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-06-20 13:22:44 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-06-20 16:31:14 +0200 |
commit | 7cfff963f792d37692c7c5355bffbe776dcd3639 (patch) | |
tree | 56c846811df4b118fe3246db09b5848b451af297 /src/weapons/Weapon.h | |
parent | Merge pull request #25 from gennariarmando/master (diff) | |
download | re3-7cfff963f792d37692c7c5355bffbe776dcd3639.tar re3-7cfff963f792d37692c7c5355bffbe776dcd3639.tar.gz re3-7cfff963f792d37692c7c5355bffbe776dcd3639.tar.bz2 re3-7cfff963f792d37692c7c5355bffbe776dcd3639.tar.lz re3-7cfff963f792d37692c7c5355bffbe776dcd3639.tar.xz re3-7cfff963f792d37692c7c5355bffbe776dcd3639.tar.zst re3-7cfff963f792d37692c7c5355bffbe776dcd3639.zip |
Diffstat (limited to 'src/weapons/Weapon.h')
-rw-r--r-- | src/weapons/Weapon.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h index 0fab027b..87134929 100644 --- a/src/weapons/Weapon.h +++ b/src/weapons/Weapon.h @@ -1,4 +1,5 @@ #pragma once +#include "Entity.h" enum eWeaponType { @@ -18,14 +19,35 @@ enum eWeaponType WEAPONTYPE_HELICANNON }; +enum eWeaponFire { + WEAPON_FIRE_MELEE, + WEAPON_FIRE_INSTANT_HIT, + WEAPON_FIRE_PROJECTILE, + WEAPON_FIRE_AREA_EFFECT, + WEAPON_FIRE_USE +}; + +// Taken from MTA SA, seems it's unchanged +enum eWeaponState +{ + WEAPONSTATE_READY, + WEAPONSTATE_FIRING, + WEAPONSTATE_RELOADING, + WEAPONSTATE_OUT_OF_AMMO, + WEAPONSTATE_MELEE_MADECONTACT +}; + class CWeapon { public: eWeaponType m_eWeaponType; - int32 m_eWeaponState; + eWeaponState m_eWeaponState; int32 m_nAmmoInClip; int32 m_nAmmoTotal; int32 m_nTimer; bool m_bAddRotOffset; + + bool Fire(CEntity*, CVector*); + static void AddGunshell(CEntity*, CVector const&, CVector2D const&, float); }; static_assert(sizeof(CWeapon) == 0x18, "CWeapon: error"); |