Go to the source code of this file.
Functions | |
void | CL_AddMapParticle (const char *particle, const vec3_t origin, const vec2_t wait, const char *info, int levelflags) |
Spawns the map particle. | |
void | CL_ParticleCheckRounds (void) |
checks whether a particle is still active in the current round | |
void | CL_ParticleFree (ptl_t *p) |
Free a particle and all it's children. | |
void | CL_ParticleRegisterArt (void) |
void | PTL_InitStartup (void) |
void | CL_ParticleRun (void) |
General system for particle running during the game. | |
void | CL_RunMapParticles (void) |
int | CL_ParseParticle (const char *name, const char **text) |
Parses particle definitions from UFO-script files. | |
void | CL_InitParticles (void) |
Initializes cvars and commands. | |
ptl_t * | CL_ParticleSpawn (const char *name, int levelFlags, const vec3_t s, const vec3_t v, const vec3_t a) |
Spawn a new particle to the map. | |
void | CL_ParticleVisible (ptl_t *p, qboolean hide) |
Mark a particle an all its children as invisible or visible. |
Definition in file cl_particle.h.
void CL_AddMapParticle | ( | const char * | ptl, | |
const vec3_t | origin, | |||
const vec2_t | wait, | |||
const char * | info, | |||
int | levelflags | |||
) |
Spawns the map particle.
[in] | ptl | Particle name |
[in] | origin | The position in the world |
[in] | wait | |
[in] | info | |
[in] | levelflags | The levelflag mask to show the particle on |
Definition at line 273 of file cl_particle.c.
References cl, Com_DPrintf(), Com_Printf(), DEBUG_CLIENT, frand(), mapParticle_s::info, mapParticle_s::levelflags, MAX_MAPPARTICLES, mapParticle_s::nextTime, mapParticle_s::origin, mapParticle_s::ptl, Q_strncpyz(), VectorCopy, and mapParticle_s::wait.
Referenced by SP_misc_particle().
void CL_InitParticles | ( | void | ) |
Initializes cvars and commands.
Definition at line 1470 of file cl_particle.c.
References Cmd_AddCommand(), CVAR_ARCHIVE, Cvar_Get(), CVAR_LATCH, PTL_DebugList_f(), and PTL_DebugSpawnMarker_f().
Referenced by CL_Init().
int CL_ParseParticle | ( | const char * | name, | |
const char ** | text | |||
) |
Parses particle definitions from UFO-script files.
[in] | name | particle name/id |
[in] | text | pointer to the buffer to parse from |
Definition at line 1344 of file cl_particle.c.
References byte, CL_ParsePtlCmds(), Com_EParse(), Com_Parse(), Com_Printf(), i, ptlDef_s::init, MAX_PTLDEFS, ptlDef_s::name, PF_NUM_PTLFUNCS, pf_strings, pos, and Q_strncpyz().
Referenced by CL_ParseClientData().
void CL_ParticleCheckRounds | ( | void | ) |
checks whether a particle is still active in the current round
Definition at line 856 of file cl_particle.c.
References CL_ParticleFree(), CL_ParticleFunction(), ptl_s::ctrl, i, ptl_s::inuse, r_numParticles, r_particles, ptlDef_s::round, ptl_s::rounds, and ptl_s::roundsCnt.
Referenced by CL_DoEndRound().
void CL_ParticleFree | ( | ptl_t * | p | ) |
Free a particle and all it's children.
[in] | p | the particle to free |
Definition at line 801 of file cl_particle.c.
References ptl_s::children, CL_ParticleFree(), ptl_s::inuse, ptl_s::invis, ptl_s::next, qfalse, and qtrue.
Referenced by CL_EntPerish(), CL_ParticleCheckRounds(), CL_ParticleFree(), CL_ParticleFunction(), CL_ParticleRun2(), and LET_Projectile().
void CL_ParticleRegisterArt | ( | void | ) |
Definition at line 325 of file cl_particle.c.
References CL_ParticleLoadArt(), i, r_numParticlesArt, and r_particlesArt.
Referenced by CL_ViewLoadMedia().
void CL_ParticleRun | ( | void | ) |
General system for particle running during the game.
Definition at line 1039 of file cl_particle.c.
References ca_active, CL_ParticleRun2(), CL_ParticleRunTimed(), cls, i, ptl_s::inuse, r_numParticles, r_particles, and client_static_s::state.
Referenced by CL_Frame().
ptl_t* CL_ParticleSpawn | ( | const char * | name, | |
int | levelFlags, | |||
const vec3_t | s, | |||
const vec3_t | v, | |||
const vec3_t | a | |||
) |
Spawn a new particle to the map.
[in] | name | The id of the particle (see ptl_*.ufo script files in base/ufos) |
[in] | levelFlags | Show at which levels |
[in] | s | starting/location vector |
[in] | v | velocity vector |
[in] | a | acceleration vector |
Definition at line 706 of file cl_particle.c.
References ptl_s::a, cl, CL_ParticleFunction(), ptl_s::color, Com_DPrintf(), Com_Printf(), ptl_s::ctrl, DEBUG_CLIENT, i, ptlDef_s::init, ptl_s::inuse, ptl_s::levelFlags, ptl_s::life, MAX_PTLS, ptl_s::model, ptl_s::origin, ptl_s::pic, qtrue, r_numParticles, r_particles, ptl_s::s, ptl_s::startTime, ptl_s::tps, ptl_s::v, Vector4Set, and VectorCopy.
Referenced by CL_ActorTraceMove(), CL_AddActor(), CL_DrawLineOfSight(), CL_NextAlienVisibleFromActor_f(), CL_ParticleAppear(), CL_ParticleFunction(), CL_ParticleRunTimed(), CL_ParticleSpawnEvent(), CL_RunMapParticles(), CL_TargetingGrenade(), CL_TargetingRadius(), CL_TargetingStraight(), LE_ActorBodyHit(), LE_AddGrenade(), LE_AddProjectile(), LE_AddToScene(), LE_PlaySoundFileAndParticleForSurface(), LET_Projectile(), and PTL_DebugSpawnMarker_f().
Mark a particle an all its children as invisible or visible.
[in] | p | Particle to set the invis flags for |
[in] | hide | Boolean value for hiding the particle |
Definition at line 785 of file cl_particle.c.
References ptl_s::children, CL_ParticleVisible(), ptl_s::invis, and ptl_s::next.
Referenced by CL_ParticleVisible().
void CL_RunMapParticles | ( | void | ) |
Definition at line 1116 of file cl_particle.c.
References ca_active, cl, CL_ParseMapParticle(), CL_ParticleFunction(), CL_ParticleSpawn(), cls, ptl_s::ctrl, frand(), i, mapParticle_s::info, ptlDef_s::init, mapParticle_s::levelflags, mapParticle_s::nextTime, mapParticle_s::origin, mapParticle_s::ptl, qfalse, qtrue, client_static_s::state, and mapParticle_s::wait.
Referenced by CL_Frame().
void PTL_InitStartup | ( | void | ) |
Definition at line 376 of file cl_particle.c.
References r_numParticles, and r_numParticlesArt.
Referenced by CL_InitLocal().