The fastest/easier way would be probably to set the m_iStyle (34) offset to a value < 32, so Use will have no effect. (a check is done with this offset if >= 32 in the Use function)
It should be fine if it's the game which provokes that, because a plugin could use directly pfnLightStyle and you would need to block it with FM_LightStyle I guess.
If you set a null targetname and the entity spawns, it will be removed.
PHP Code:
void CLight :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
if (m_iStyle >= 32)
{
if ( !ShouldToggle( useType, !FBitSet(pev->spawnflags, SF_LIGHT_START_OFF) ) )
return;
if (FBitSet(pev->spawnflags, SF_LIGHT_START_OFF))
{
if (m_iszPattern)
LIGHT_STYLE(m_iStyle, (char *)STRING( m_iszPattern ));
else
LIGHT_STYLE(m_iStyle, "m");
ClearBits(pev->spawnflags, SF_LIGHT_START_OFF);
}
else
{
LIGHT_STYLE(m_iStyle, "a");
SetBits(pev->spawnflags, SF_LIGHT_START_OFF);
}
}
}
__________________