UFO: Alien Invasion
Loading...
Searching...
No Matches
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)
 Clears particle data.
void CL_ParticleRun (void)
 General system for particle running during the game.
void CL_ParseParticle (const char *name, const char **text)
 Parses particle definitions from UFO-script files.
ptl_tCL_ParticleSpawn (const char *name, int levelFlags, const vec3_t s, const vec3_t v=nullptr, const vec3_t a=nullptr)
 Spawn a new particle to the map.
ptlDef_tCL_ParticleGet (const char *particleID)

Function Documentation

◆ CL_AddMapParticle()

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]ptlParticle name
[in]originThe position in the world
[in]wait
[in]info
[in]levelflagsThe levelflag mask to show the particle on

Definition at line 276 of file cl_particle.cpp.

References cl, Com_DPrintf(), Com_Printf(), DEBUG_CLIENT, frand(), mapParticle_t::info, mapParticle_t::levelflags, mapParticles, MAX_MAPPARTICLES, mapParticle_t::nextTime, mapParticle_t::origin, mapParticle_t::ptl, Q_strncpyz(), VectorCopy, and mapParticle_t::wait.

Referenced by SP_misc_particle().

◆ CL_ParseParticle()

void CL_ParseParticle ( const char * name,
const char ** text )

Parses particle definitions from UFO-script files.

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

Definition at line 1355 of file cl_particle.cpp.

References CL_ParsePtlCmds(), Com_EParse(), Com_Parse(), Com_Printf(), i, ptlDef_t::init, MAX_PTLDEFS, name, ptlDef_t::name, numPtlCmds, numPtlDefs, OBJZERO, PF_NUM_PTLFUNCS, pf_strings, pf_values, ptlCmd, ptlDef, Q_streq, and Q_strncpyz().

Referenced by CL_ParseClientData().

◆ CL_ParticleCheckRounds()

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 827 of file cl_particle.cpp.

References CL_ParticleFree(), CL_ParticleFunction(), ptl_t::ctrl, i, ptl_t::inuse, r_numParticles, r_particleArray, ptlDef_t::round, ptl_t::rounds, and ptl_t::roundsCnt.

Referenced by CL_DoEndRound().

◆ CL_ParticleFree()

void CL_ParticleFree ( ptl_t * p)

Free a particle and all it's children.

Parameters
[in]pthe particle to free
See also
CL_ParticleSpawn

Definition at line 776 of file cl_particle.cpp.

References ptl_t::children, CL_ParticleFree(), ptl_t::inuse, and ptl_t::invis.

Referenced by CL_ActorDie(), CL_ActorRevitalised(), CL_EntPerish(), CL_ParticleCheckRounds(), CL_ParticleFree(), CL_ParticleFunction(), CL_ParticleRun2(), and LET_Projectile().

◆ CL_ParticleGet()

ptlDef_t * CL_ParticleGet ( const char * particleID)

Definition at line 678 of file cl_particle.cpp.

References i, name, ptlDef_t::name, numPtlDefs, ptlDef, Q_streq, and Q_strnull().

Referenced by CL_ParticleSpawn(), TEST_CheckParticle(), and TEST_F().

◆ CL_ParticleRegisterArt()

void CL_ParticleRegisterArt ( void )

Definition at line 324 of file cl_particle.cpp.

References CL_ParticleLoadArt(), i, r_numParticlesArt, and r_particlesArt.

Referenced by CL_ViewLoadMedia().

◆ CL_ParticleRun()

void CL_ParticleRun ( void )

General system for particle running during the game.

See also
CL_Frame

Definition at line 1148 of file cl_particle.cpp.

References CL_ParticleRun2(), CL_ParticleRunTimed(), CL_RunMapParticles(), i, ptl_t::inuse, r_numParticles, and r_particleArray.

Referenced by CL_Frame(), and TEST_F().

◆ CL_ParticleSpawn()

◆ PTL_InitStartup()