CBasePlayer::SelectItem:: Add check for item can to holster.

This commit is contained in:
s1lent 2019-08-14 02:59:17 +07:00
parent 6e9ece411b
commit 2defb8ad8e
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -5646,6 +5646,11 @@ NOXREF void CBasePlayer::SelectNextItem(int iItem)
return;
}
#ifdef REGAMEDLL_FIXES
if (m_pActiveItem && !m_pActiveItem->CanHolster())
return;
#endif
if (pItem == m_pActiveItem)
{
pItem = m_pActiveItem->m_pNext;
@ -5697,6 +5702,11 @@ void CBasePlayer::SelectItem(const char *pstr)
return;
}
#ifdef REGAMEDLL_FIXES
if (m_pActiveItem && !m_pActiveItem->CanHolster())
return;
#endif
auto pItem = GetItemByName(pstr);
if (!pItem || pItem == m_pActiveItem)
return;