mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-09 05:24:17 +00:00
This commit is contained in:
parent
9ef79aee9e
commit
e98f45b279
@ -578,6 +578,13 @@ void CBasePlayerItem::DefaultTouch( CBaseEntity *pOther )
|
|||||||
}
|
}
|
||||||
|
|
||||||
SUB_UseTargets( pOther, USE_TOGGLE, 0 ); // UNDONE: when should this happen?
|
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 )
|
BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user