Night Owl 2017-07-05 21:53:57 +05:00
parent 9ef79aee9e
commit e98f45b279
1 changed files with 7 additions and 0 deletions

View File

@ -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 )