mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 23:25:41 +03:00
Ensure HasPrimary flag assignation on successful weapon removal (#866)
This commit is contained in:
parent
e422a37d8b
commit
a2678a18ed
@ -8056,8 +8056,10 @@ CBaseEntity *EXT_FUNC CBasePlayer::__API_HOOK(DropPlayerItem)(const char *pszIte
|
||||
g_pGameRules->GetNextBestWeapon(this, pWeapon);
|
||||
UTIL_MakeVectors(pev->angles);
|
||||
|
||||
#ifndef REGAMEDLL_FIXES
|
||||
if (pWeapon->iItemSlot() == PRIMARY_WEAPON_SLOT)
|
||||
m_bHasPrimary = false;
|
||||
m_bHasPrimary = false; // I may have more than just 1 primary weapon :)
|
||||
#endif
|
||||
|
||||
if (FClassnameIs(pWeapon->pev, "weapon_c4"))
|
||||
{
|
||||
@ -8127,6 +8129,12 @@ CBaseEntity *EXT_FUNC CBasePlayer::__API_HOOK(DropPlayerItem)(const char *pszIte
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
if (!m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]) {
|
||||
m_bHasPrimary = false; // ensure value assignation on successful weapon removal
|
||||
}
|
||||
#endif
|
||||
|
||||
if (FClassnameIs(pWeapon->pev, "weapon_c4"))
|
||||
{
|
||||
pWeaponBox->m_bIsBomb = true;
|
||||
|
Loading…
Reference in New Issue
Block a user