mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Add Drop to floor flag for item_generic
This commit is contained in:
parent
6e7bf80d08
commit
f115d3105e
@ -21,6 +21,8 @@
|
||||
//=========================================================
|
||||
// Generic item
|
||||
//=========================================================
|
||||
#define SF_ITEM_GENERIC_DROP_TO_FLOOR 1
|
||||
|
||||
class CItemGeneric : public CBaseAnimating
|
||||
{
|
||||
public:
|
||||
@ -62,6 +64,15 @@ void CItemGeneric::Spawn(void)
|
||||
// Call startup sequence to look for a sequence to play.
|
||||
SetThink(&CItemGeneric::StartupThink);
|
||||
pev->nextthink = gpGlobals->time + 0.1f;
|
||||
|
||||
if (FBitSet(pev->spawnflags, SF_ITEM_GENERIC_DROP_TO_FLOOR))
|
||||
{
|
||||
if( DROP_TO_FLOOR(ENT( pev ) ) == 0 )
|
||||
{
|
||||
ALERT(at_error, "Item %s fell out of level at %f,%f,%f\n", STRING( pev->classname ), pev->origin.x, pev->origin.y, pev->origin.z);
|
||||
UTIL_Remove( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CItemGeneric::Precache(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user