diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index bc508c6a..61b038c0 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -578,6 +578,13 @@ void CBasePlayerItem::DefaultTouch( CBaseEntity *pOther ) } SUB_UseTargets( pOther, USE_TOGGLE, 0 ); // UNDONE: when should this happen? + + // If the item is falling and its Think remains FallItem after the player picks it up, + // then after the item touches the ground its Touch will be set back to DefaultTouch, + // so the player will pick it up again, this time Kill-ing the item (since we already have it in the inventory), + // which will make the pointer bad and crash the game. + if( m_pfnThink == &CBasePlayerItem::FallThink ) + SetThink( NULL ); } BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted )