Skip to content

Commit da71893

Browse files
authored
Fix crash when switching weapons when hand grenades are used up. (#551)
1 parent 6e3baf0 commit da71893

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dlls/handgrenade.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ void CHandGrenade::Holster( int skiplocal /* = 0 */ )
9999
{
100100
// no more grenades!
101101
m_pPlayer->pev->weapons &= ~( 1 << WEAPON_HANDGRENADE );
102-
DestroyItem();
102+
SetThink( &CHandGrenade::DestroyItem );
103+
pev->nextthink = gpGlobals->time + 0.1;
103104
}
104105

105106
if( m_flStartThrow )

0 commit comments

Comments
 (0)