Пример #1
0
/*
===============
SP_spawn_particle_system

Spawn function for particle system
===============
 */
void SP_misc_particle_system(gentity_t *self) {
  char *s;

  G_SetOrigin(self, self->s.origin);

  G_SpawnString("psName", "", &s);
  G_SpawnFloat("wait", "0", &self->wait);

  //add the particle system to the client precache list
  self->s.modelindex = G_ParticleSystemIndex(s);

  if (self->spawnflags & 1)
    self->s.eFlags |= EF_NODRAW;

  self->use = SP_use_particle_system;
  self->s.eType = ET_PARTICLE_SYSTEM;
  trap_LinkEntity(self);
}
Пример #2
0
void SP_gfx_particle_system( gentity_t *self )
{
	char *s;

	G_SetOrigin( self, self->s.origin );
	VectorCopy( self->s.angles, self->s.apos.trBase );

	G_SpawnString( "psName", "", &s );

	//add the particle system to the client precache list
	self->s.modelindex = G_ParticleSystemIndex( s );

	if ( self->spawnflags & SPF_SPAWN_DISABLED )
	{
		self->s.eFlags |= EF_NODRAW;
	}

	self->act = gfx_particle_system_act;
	self->s.eType = ET_PARTICLE_SYSTEM;
	trap_LinkEntity( self );
}