diff --git a/dlls/gearbox/generic_items.cpp b/dlls/gearbox/generic_items.cpp index c8217cbf..5b5088e5 100644 --- a/dlls/gearbox/generic_items.cpp +++ b/dlls/gearbox/generic_items.cpp @@ -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)