예제 #1
0
void CBaseDelay::DelayThink( void )
{
	CBaseEntity *pActivator = NULL;

	if( GetOwner() )		// A player activated this on delay
	{
		pActivator = GetOwner();
	}
	// The use type is cached (and stashed) in GetButtons()
	SUB_UseTargets( pActivator, ( USE_TYPE ) GetButtons().Get(), 0 );
	UTIL_RemoveNow( this );
}
예제 #2
0
void CEnvGlobal::Spawn( void )
{
	if( !m_globalstate )
	{
		UTIL_RemoveNow( this );
		return;
	}
	if( FBitSet( pev->spawnflags, SF_GLOBAL_SET ) )
	{
		if( !gGlobalState.EntityInTable( m_globalstate ) )
			gGlobalState.EntityAdd( m_globalstate, gpGlobals->mapname, ( GLOBALESTATE ) m_initialstate );
	}
}