Signed-off-by: eray orçunus <erayorcunus@gmail.com>
This commit is contained in:
eray orçunus
2019-07-06 01:44:49 +03:00
parent d62c616545
commit 0e7a471b82
6 changed files with 540 additions and 63 deletions

View File

@ -35,6 +35,12 @@ CWeapon::Reload(void)
m_nAmmoInClip = m_nAmmoTotal;
}
bool
CWeapon::IsTypeMelee(void)
{
return m_eWeaponType == WEAPONTYPE_UNARMED || m_eWeaponType == WEAPONTYPE_BASEBALLBAT;
}
STARTPATCHES
InjectHook(0x55C330, &CWeapon::Initialise, PATCH_JUMP);
InjectHook(0x5639D0, &CWeapon::Reload, PATCH_JUMP);

View File

@ -58,5 +58,6 @@ public:
void Reload(void);
bool Fire(CEntity*, CVector*);
void AddGunshell(CEntity*, CVector const&, CVector2D const&, float);
bool IsTypeMelee(void);
};
static_assert(sizeof(CWeapon) == 0x18, "CWeapon: error");