class CTriggerPlayerFreeze : public CBaseDelay
{
public:
void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
int ObjectCaps( void ) { return CBaseDelay::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
};
LINK_ENTITY_TO_CLASS( trigger_playerfreeze, CTriggerPlayerFreeze );
void CTriggerPlayerFreeze::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
if ( !pActivator || !pActivator->IsPlayer() )
pActivator = CBaseEntity::Instance(g_engfuncs.pfnPEntityOfEntIndex( 1 ));
if (pActivator->pev->flags & FL_FROZEN)
((CBasePlayer *)((CBaseEntity *)pActivator))->EnableControl(TRUE);
else ((CBasePlayer *)((CBaseEntity *)pActivator))->EnableControl(FALSE);
}