This commit is contained in:
Night Owl 2017-07-11 01:58:22 +05:00
parent 2df762e705
commit 8455d69360
1 changed files with 3 additions and 1 deletions

View File

@ -3661,7 +3661,9 @@ int CBasePlayer::RemovePlayerItem( CBasePlayerItem *pItem )
pev->viewmodel = 0;
pev->weaponmodel = 0;
}
else if( m_pLastItem == pItem )
// In some cases an item can be both the active and last item, like for instance dropping all weapons and only having an exhaustible weapon left. - Solokiller
if( m_pLastItem == pItem )
m_pLastItem = NULL;
CBasePlayerItem *pPrev = m_rgpPlayerItems[pItem->iItemSlot()];