Пример #1
0
void light_use(  )
{
	if ( ( int ) ( self->s.v.spawnflags ) & START_OFF )
	{
		trap_lightstyle( self->style, "m" );
		self->s.v.spawnflags -= START_OFF;
	} else
	{
		trap_lightstyle( self->style, "a" );
		self->s.v.spawnflags += START_OFF;
	}
}
Пример #2
0
Файл: misc.c Проект: deurk/ktx
/*QUAKED light_fluoro (0 1 0) (-8 -8 -8) (8 8 8) START_OFF
Non-displayed light.
Default light value is 300
Default style is 0
If targeted, it will toggle between on or off.
Makes steady fluorescent humming sound
*/
void SP_light_fluoro()
{
	if ( self->style >= 32 )
	{
		self->use = ( func_t ) light_use;
		if ( ( int ) self->s.v.spawnflags & START_OFF )
			trap_lightstyle( self->style, "a" );
		else
			trap_lightstyle( self->style, "m" );
	}

	trap_precache_sound( "ambience/fl_hum1.wav" );
	trap_ambientsound( PASSVEC3( self->s.v.origin ), "ambience/fl_hum1.wav", 0.5,
			   ATTN_STATIC );
}
Пример #3
0
Файл: misc.c Проект: deurk/ktx
/*QUAKED light (0 1 0) (-8 -8 -8) (8 8 8) START_OFF
Non-displayed light.
Default light value is 300
Default style is 0
If targeted, it will toggle between on or off.
*/
void SP_light()
{

	if ( !self->targetname )
	{			// inert light
		ent_remove( self );
		return;
	}

	if ( self->style >= 32 )
	{
		self->use = ( func_t ) light_use;
		if ( ( int ) self->s.v.spawnflags & START_OFF )
			trap_lightstyle( self->style, "a" );
		else
			trap_lightstyle( self->style, "m" );
	}
}