cl_particle.h File Reference

This graph shows which files directly or indirectly include this file:

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_tCL_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.

Detailed Description

Definition in file cl_particle.h.


Function Documentation

void CL_AddMapParticle ( const char *  ptl,
const vec3_t  origin,
const vec2_t  wait,
const char *  info,
int  levelflags 
)

Spawns the map particle.

Parameters:
[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.

Parameters:
[in] name particle name/id
[in] text pointer to the buffer to parse from
Returns:
the position of the particle in ptlDef array
See also:
CL_ParseClientData

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

Note:
also calls the round function of each particle (if defined)
See also:
CL_ParticleFunction

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.

Parameters:
[in] p the particle to free
See also:
CL_ParticleSpawn

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.

See also:
CL_Frame

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 
)
void CL_ParticleVisible ( ptl_t p,
qboolean  hide 
)

Mark a particle an all its children as invisible or visible.

Parameters:
[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   ) 
void PTL_InitStartup ( void   ) 
See also:
CL_InitLocal

Definition at line 376 of file cl_particle.c.

References r_numParticles, and r_numParticlesArt.

Referenced by CL_InitLocal().


Generated by  doxygen 1.6.2