diff options
author | aap <aap@papnet.eu> | 2019-07-16 18:31:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 18:31:29 +0200 |
commit | 3fee2bef9888e188b07e011067652388a5585f96 (patch) | |
tree | b80e8bc8569fbdda5929123a8f47d0c62aea0ab0 /src/weapons | |
parent | Merge pull request #136 from Nick007J/master (diff) | |
parent | Merge branch 'master' into erorcun (diff) | |
download | re3-3fee2bef9888e188b07e011067652388a5585f96.tar re3-3fee2bef9888e188b07e011067652388a5585f96.tar.gz re3-3fee2bef9888e188b07e011067652388a5585f96.tar.bz2 re3-3fee2bef9888e188b07e011067652388a5585f96.tar.lz re3-3fee2bef9888e188b07e011067652388a5585f96.tar.xz re3-3fee2bef9888e188b07e011067652388a5585f96.tar.zst re3-3fee2bef9888e188b07e011067652388a5585f96.zip |
Diffstat (limited to '')
-rw-r--r-- | src/weapons/Weapon.cpp | 6 | ||||
-rw-r--r-- | src/weapons/Weapon.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 90a6408b..cd63544f 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -36,6 +36,12 @@ CWeapon::Reload(void) } bool +CWeapon::IsType2Handed(void) +{ + return m_eWeaponType >= WEAPONTYPE_SHOTGUN && m_eWeaponType <= WEAPONTYPE_FLAMETHROWER && m_eWeaponType != WEAPONTYPE_ROCKETLAUNCHER; +} + +bool CWeapon::IsTypeMelee(void) { return m_eWeaponType == WEAPONTYPE_UNARMED || m_eWeaponType == WEAPONTYPE_BASEBALLBAT; diff --git a/src/weapons/Weapon.h b/src/weapons/Weapon.h index 81516c4e..fc1d9988 100644 --- a/src/weapons/Weapon.h +++ b/src/weapons/Weapon.h @@ -65,5 +65,6 @@ public: bool Fire(CEntity*, CVector*); void AddGunshell(CEntity*, CVector const&, CVector2D const&, float); bool IsTypeMelee(void); + bool IsType2Handed(void); }; static_assert(sizeof(CWeapon) == 0x18, "CWeapon: error"); |