icculus quake2 doxygen  1.0 dev
cl_fx.c File Reference
#include "client.h"

Go to the source code of this file.

Classes

struct  clightstyle_t
 

Macros

#define BEAMLENGTH   16
 
#define BEAMLENGTH   16
 

Functions

void CL_LogoutEffect (vec3_t org, int type)
 
void CL_ItemRespawnParticles (vec3_t org)
 
void CL_ClearLightStyles (void)
 
void CL_RunLightStyles (void)
 
void CL_SetLightstyle (int i)
 
void CL_AddLightStyles (void)
 
void CL_ClearDlights (void)
 
cdlight_tCL_AllocDlight (int key)
 
void CL_NewDlight (int key, float x, float y, float z, float radius, float time)
 
void CL_RunDLights (void)
 
void CL_ParseMuzzleFlash (void)
 
void CL_ParseMuzzleFlash2 (void)
 
void CL_AddDLights (void)
 
void CL_ClearParticles (void)
 
void CL_ParticleEffect (vec3_t org, vec3_t dir, int color, int count)
 
void CL_ParticleEffect2 (vec3_t org, vec3_t dir, int color, int count)
 
void CL_ParticleEffect3 (vec3_t org, vec3_t dir, int color, int count)
 
void CL_TeleporterParticles (entity_state_t *ent)
 
void CL_ExplosionParticles (vec3_t org)
 
void CL_BigTeleportParticles (vec3_t org)
 
void CL_BlasterParticles (vec3_t org, vec3_t dir)
 
void CL_BlasterTrail (vec3_t start, vec3_t end)
 
void CL_QuadTrail (vec3_t start, vec3_t end)
 
void CL_FlagTrail (vec3_t start, vec3_t end, float color)
 
void CL_DiminishingTrail (vec3_t start, vec3_t end, centity_t *old, int flags)
 
void MakeNormalVectors (vec3_t forward, vec3_t right, vec3_t up)
 
void CL_RocketTrail (vec3_t start, vec3_t end, centity_t *old)
 
void CL_RailTrail (vec3_t start, vec3_t end)
 
void CL_IonripperTrail (vec3_t start, vec3_t ent)
 
void CL_BubbleTrail (vec3_t start, vec3_t end)
 
void CL_FlyParticles (vec3_t origin, int count)
 
void CL_FlyEffect (centity_t *ent, vec3_t origin)
 
void CL_BfgParticles (entity_t *ent)
 
void CL_TrapParticles (entity_t *ent)
 
void CL_BFGExplosionParticles (vec3_t org)
 
void CL_TeleportParticles (vec3_t org)
 
void CL_AddParticles (void)
 
void CL_EntityEvent (entity_state_t *ent)
 
void CL_ClearEffects (void)
 

Variables

static vec3_t avelocities [NUMVERTEXNORMALS]
 
struct model_scl_mod_smoke
 
struct model_scl_mod_flash
 
clightstyle_t cl_lightstyle [MAX_LIGHTSTYLES]
 
int lastofs
 
cparticle_tactive_particles
 
cparticle_tfree_particles
 
cparticle_t particles [MAX_PARTICLES]
 
int cl_numparticles = MAX_PARTICLES
 
cdlight_t cl_dlights [MAX_DLIGHTS]
 
struct sfx_scl_sfx_footsteps [4]
 

Macro Definition Documentation

◆ BEAMLENGTH [1/2]

#define BEAMLENGTH   16

Definition at line 2064 of file cl_fx.c.

◆ BEAMLENGTH [2/2]

#define BEAMLENGTH   16

Definition at line 2064 of file cl_fx.c.

Function Documentation

◆ CL_AddDLights()

void CL_AddDLights ( void  )

Definition at line 912 of file cl_fx.c.

913 {
914  int i;
915  cdlight_t *dl;
916 
917  dl = cl_dlights;
918 
919 //=====
920 //PGM
921  if(vidref_val == VIDREF_GL)
922  {
923  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
924  {
925  if (!dl->radius)
926  continue;
927  V_AddLight (dl->origin, dl->radius,
928  dl->color[0], dl->color[1], dl->color[2]);
929  }
930  }
931  else
932  {
933  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
934  {
935  if (!dl->radius)
936  continue;
937 
938  // negative light in software. only black allowed
939  if ((dl->color[0] < 0) || (dl->color[1] < 0) || (dl->color[2] < 0))
940  {
941  dl->radius = -(dl->radius);
942  dl->color[0] = 1;
943  dl->color[1] = 1;
944  dl->color[2] = 1;
945  }
946  V_AddLight (dl->origin, dl->radius,
947  dl->color[0], dl->color[1], dl->color[2]);
948  }
949  }
950 //PGM
951 //=====
952 }

Referenced by CL_AddEntities().

◆ CL_AddLightStyles()

void CL_AddLightStyles ( void  )

Definition at line 214 of file cl_fx.c.

215 {
216  int i;
217  clightstyle_t *ls;
218 
219  for (i=0,ls=cl_lightstyle ; i<MAX_LIGHTSTYLES ; i++, ls++)
220  V_AddLightStyle (i, ls->value[0], ls->value[1], ls->value[2]);
221 }

Referenced by CL_AddEntities().

◆ CL_AddParticles()

void CL_AddParticles ( void  )

Definition at line 2332 of file cl_fx.c.

2333 {
2334  cparticle_t *p, *next;
2335  float alpha;
2336  float time, time2;
2337  vec3_t org;
2338  int color;
2339  cparticle_t *active, *tail;
2340 
2341  active = NULL;
2342  tail = NULL;
2343 
2344  for (p=active_particles ; p ; p=next)
2345  {
2346  next = p->next;
2347 
2348  // PMM - added INSTANT_PARTICLE handling for heat beam
2349  if (p->alphavel != INSTANT_PARTICLE)
2350  {
2351  time = (cl.time - p->time)*0.001;
2352  alpha = p->alpha + time*p->alphavel;
2353  if (alpha <= 0)
2354  { // faded out
2355  p->next = free_particles;
2356  free_particles = p;
2357  continue;
2358  }
2359  }
2360  else
2361  {
2362  time = 0.0f;
2363  alpha = p->alpha;
2364  }
2365 
2366  p->next = NULL;
2367  if (!tail)
2368  active = tail = p;
2369  else
2370  {
2371  tail->next = p;
2372  tail = p;
2373  }
2374 
2375  if (alpha > 1.0)
2376  alpha = 1;
2377 #ifndef QMAX
2378  color = p->color;
2379 #endif
2380  time2 = time*time;
2381 
2382  org[0] = p->org[0] + p->vel[0]*time + p->accel[0]*time2;
2383  org[1] = p->org[1] + p->vel[1]*time + p->accel[1]*time2;
2384  org[2] = p->org[2] + p->vel[2]*time + p->accel[2]*time2;
2385 
2386  V_AddParticle (org, color, alpha);
2387  // PMM
2388  if (p->alphavel == INSTANT_PARTICLE)
2389  {
2390  p->alphavel = 0.0;
2391  p->alpha = 0.0;
2392  }
2393  }
2394 
2395  active_particles = active;
2396 }

Referenced by CL_AddEntities().

◆ CL_AllocDlight()

cdlight_t* CL_AllocDlight ( int  key)

Definition at line 249 of file cl_fx.c.

250 {
251  int i;
252  cdlight_t *dl;
253 
254 // first look for an exact key match
255  if (key)
256  {
257  dl = cl_dlights;
258  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
259  {
260  if (dl->key == key)
261  {
262  memset (dl, 0, sizeof(*dl));
263  dl->key = key;
264  return dl;
265  }
266  }
267  }
268 
269 // then look for anything else
270  dl = cl_dlights;
271  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
272  {
273  if (dl->die < cl.time)
274  {
275  memset (dl, 0, sizeof(*dl));
276  dl->key = key;
277  return dl;
278  }
279  }
280 
281  dl = &cl_dlights[0];
282  memset (dl, 0, sizeof(*dl));
283  dl->key = key;
284  return dl;
285 }

Referenced by CL_ColorFlash(), CL_Flashlight(), CL_NewDlight(), CL_ParseMuzzleFlash(), and CL_ParseMuzzleFlash2().

◆ CL_BFGExplosionParticles()

void CL_BFGExplosionParticles ( vec3_t  org)

Definition at line 2245 of file cl_fx.c.

2246 {
2247  int i, j;
2248  cparticle_t *p;
2249 
2250  for (i=0 ; i<256 ; i++)
2251  {
2252  if (!free_particles)
2253  return;
2254  p = free_particles;
2255  free_particles = p->next;
2256  p->next = active_particles;
2257  active_particles = p;
2258 
2259  p->time = cl.time;
2260 #ifndef QMAX
2261  p->color = 0xd0 + (rand()&7);
2262 #endif
2263  for (j=0 ; j<3 ; j++)
2264  {
2265  p->org[j] = org[j] + ((rand()%32)-16);
2266  p->vel[j] = (rand()%384)-192;
2267  }
2268 
2269  p->accel[0] = p->accel[1] = 0;
2270  p->accel[2] = -PARTICLE_GRAVITY;
2271  p->alpha = 1.0;
2272 
2273  p->alphavel = -0.8 / (0.5 + frand()*0.3);
2274  }
2275 }

◆ CL_BfgParticles()

void CL_BfgParticles ( entity_t ent)

Definition at line 2065 of file cl_fx.c.

2066 {
2067  int i;
2068  cparticle_t *p;
2069  float angle;
2070  float sr, sp, sy, cr, cp, cy;
2071  vec3_t forward;
2072  float dist = 64;
2073  vec3_t v;
2074  float ltime;
2075 
2076  if (!avelocities[0][0])
2077  {
2078  for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
2079  avelocities[0][i] = (rand()&255) * 0.01;
2080  }
2081 
2082 
2083  ltime = (float)cl.time / 1000.0;
2084  for (i=0 ; i<NUMVERTEXNORMALS ; i++)
2085  {
2086  angle = ltime * avelocities[i][0];
2087  sy = sin(angle);
2088  cy = cos(angle);
2089  angle = ltime * avelocities[i][1];
2090  sp = sin(angle);
2091  cp = cos(angle);
2092  angle = ltime * avelocities[i][2];
2093  sr = sin(angle);
2094  cr = cos(angle);
2095 
2096  forward[0] = cp*cy;
2097  forward[1] = cp*sy;
2098  forward[2] = -sp;
2099 
2100  if (!free_particles)
2101  return;
2102  p = free_particles;
2103  free_particles = p->next;
2104  p->next = active_particles;
2105  active_particles = p;
2106 
2107  p->time = cl.time;
2108 
2109  dist = sin(ltime + i)*64;
2110  p->org[0] = ent->origin[0] + bytedirs[i][0]*dist + forward[0]*BEAMLENGTH;
2111  p->org[1] = ent->origin[1] + bytedirs[i][1]*dist + forward[1]*BEAMLENGTH;
2112  p->org[2] = ent->origin[2] + bytedirs[i][2]*dist + forward[2]*BEAMLENGTH;
2113 
2114  VectorClear (p->vel);
2115  VectorClear (p->accel);
2116 
2117  VectorSubtract (p->org, ent->origin, v);
2118  dist = VectorLength(v) / 90.0;
2119 #ifndef QMAX
2120  p->color = floor (0xd0 + dist * 7);
2121  p->colorvel = 0;
2122 #endif
2123  p->alpha = 1.0 - dist;
2124  p->alphavel = -100;
2125  }
2126 }

Referenced by CL_AddPacketEntities().

◆ CL_BigTeleportParticles()

void CL_BigTeleportParticles ( vec3_t  org)

Definition at line 1313 of file cl_fx.c.

1314 {
1315  int i;
1316  cparticle_t *p;
1317  float angle, dist;
1318  static int colortable[4] = {2*8,13*8,21*8,18*8};
1319 
1320  for (i=0 ; i<4096 ; i++)
1321  {
1322  if (!free_particles)
1323  return;
1324  p = free_particles;
1325  free_particles = p->next;
1326  p->next = active_particles;
1327  active_particles = p;
1328 
1329  p->time = cl.time;
1330 #ifndef QMAX
1331  p->color = colortable[rand()&3];
1332 #endif
1333  angle = M_PI*2*(rand()&1023)/1023.0;
1334  dist = rand()&31;
1335  p->org[0] = org[0] + cos(angle)*dist;
1336  p->vel[0] = cos(angle)*(70+(rand()&63));
1337  p->accel[0] = -cos(angle)*100;
1338 
1339  p->org[1] = org[1] + sin(angle)*dist;
1340  p->vel[1] = sin(angle)*(70+(rand()&63));
1341  p->accel[1] = -sin(angle)*100;
1342 
1343  p->org[2] = org[2] + 8 + (rand()%90);
1344  p->vel[2] = -100 + (rand()&31);
1345  p->accel[2] = PARTICLE_GRAVITY*4;
1346  p->alpha = 1.0;
1347 
1348  p->alphavel = -0.3 / (0.5 + frand()*0.3);
1349  }
1350 }

Referenced by CL_ParseTEnt().

◆ CL_BlasterParticles()

void CL_BlasterParticles ( vec3_t  org,
vec3_t  dir 
)

Definition at line 1360 of file cl_fx.c.

1361 {
1362  int i, j;
1363  cparticle_t *p;
1364  float d;
1365  int count;
1366 
1367  count = 40;
1368  for (i=0 ; i<count ; i++)
1369  {
1370  if (!free_particles)
1371  return;
1372  p = free_particles;
1373  free_particles = p->next;
1374  p->next = active_particles;
1375  active_particles = p;
1376 
1377  p->time = cl.time;
1378 #ifndef QMAX
1379  p->color = 0xe0 + (rand()&7);
1380 #endif
1381  d = rand()&15;
1382  for (j=0 ; j<3 ; j++)
1383  {
1384  p->org[j] = org[j] + ((rand()&7)-4) + d*dir[j];
1385  p->vel[j] = dir[j] * 30 + crand()*40;
1386  }
1387 
1388  p->accel[0] = p->accel[1] = 0;
1389  p->accel[2] = -PARTICLE_GRAVITY;
1390  p->alpha = 1.0;
1391 
1392  p->alphavel = -1.0 / (0.5 + frand()*0.3);
1393  }
1394 }

Referenced by CL_ParseTEnt().

◆ CL_BlasterTrail()

void CL_BlasterTrail ( vec3_t  start,
vec3_t  end 
)

Definition at line 1403 of file cl_fx.c.

1404 {
1405  vec3_t move;
1406  vec3_t vec;
1407  float len;
1408  int j;
1409  cparticle_t *p;
1410  int dec;
1411 
1412  VectorCopy (start, move);
1413  VectorSubtract (end, start, vec);
1414  len = VectorNormalize (vec);
1415 
1416  dec = 5;
1417  VectorScale (vec, 5, vec);
1418 
1419  // FIXME: this is a really silly way to have a loop
1420  while (len > 0)
1421  {
1422  len -= dec;
1423 
1424  if (!free_particles)
1425  return;
1426  p = free_particles;
1427  free_particles = p->next;
1428  p->next = active_particles;
1429  active_particles = p;
1430  VectorClear (p->accel);
1431 
1432  p->time = cl.time;
1433 
1434  p->alpha = 1.0;
1435  p->alphavel = -1.0 / (0.3+frand()*0.2);
1436 #ifndef QMAX
1437  p->color = 0xe0;
1438 #endif
1439  for (j=0 ; j<3 ; j++)
1440  {
1441  p->org[j] = move[j] + crand();
1442  p->vel[j] = crand()*5;
1443  p->accel[j] = 0;
1444  }
1445 
1446  VectorAdd (move, vec, move);
1447  }
1448 }

Referenced by CL_AddPacketEntities().

◆ CL_BubbleTrail()

void CL_BubbleTrail ( vec3_t  start,
vec3_t  end 
)

Definition at line 1909 of file cl_fx.c.

1910 {
1911  vec3_t move;
1912  vec3_t vec;
1913  float len;
1914  int i, j;
1915  cparticle_t *p;
1916  float dec;
1917 
1918  VectorCopy (start, move);
1919  VectorSubtract (end, start, vec);
1920  len = VectorNormalize (vec);
1921 
1922  dec = 32;
1923  VectorScale (vec, dec, vec);
1924 
1925  for (i=0 ; i<len ; i+=dec)
1926  {
1927  if (!free_particles)
1928  return;
1929 
1930  p = free_particles;
1931  free_particles = p->next;
1932  p->next = active_particles;
1933  active_particles = p;
1934 
1935  VectorClear (p->accel);
1936  p->time = cl.time;
1937 
1938  p->alpha = 1.0;
1939  p->alphavel = -1.0 / (1+frand()*0.2);
1940 #ifndef QMAX
1941  p->color = 4 + (rand()&7);
1942 #endif
1943  for (j=0 ; j<3 ; j++)
1944  {
1945  p->org[j] = move[j] + crand()*2;
1946  p->vel[j] = crand()*5;
1947  }
1948  p->vel[2] += 6;
1949 
1950  VectorAdd (move, vec, move);
1951  }
1952 }

Referenced by CL_ParseTEnt().

◆ CL_ClearDlights()

void CL_ClearDlights ( void  )

Definition at line 238 of file cl_fx.c.

239 {
240  memset (cl_dlights, 0, sizeof(cl_dlights));
241 }

Referenced by CL_ClearEffects().

◆ CL_ClearEffects()

void CL_ClearEffects ( void  )

Definition at line 2445 of file cl_fx.c.

2446 {
2447  CL_ClearParticles ();
2448  CL_ClearDlights ();
2450 }

Referenced by CL_ClearState().

◆ CL_ClearLightStyles()

void CL_ClearLightStyles ( void  )

Definition at line 155 of file cl_fx.c.

156 {
157  memset (cl_lightstyle, 0, sizeof(cl_lightstyle));
158  lastofs = -1;
159 }

Referenced by CL_ClearEffects().

◆ CL_ClearParticles()

void CL_ClearParticles ( void  )

Definition at line 991 of file cl_fx.c.

992 {
993  int i;
994 
997 
998  for (i=0 ;i<cl_numparticles ; i++)
999  particles[i].next = &particles[i+1];
1001 }

Referenced by CL_ClearEffects().

◆ CL_DiminishingTrail()

void CL_DiminishingTrail ( vec3_t  start,
vec3_t  end,
centity_t old,
int  flags 
)

Definition at line 1564 of file cl_fx.c.

1565 {
1566  vec3_t move;
1567  vec3_t vec;
1568  float len;
1569  int j;
1570  cparticle_t *p;
1571  float dec;
1572  float orgscale;
1573  float velscale;
1574 
1575  VectorCopy (start, move);
1576  VectorSubtract (end, start, vec);
1577  len = VectorNormalize (vec);
1578 
1579  dec = 0.5;
1580  VectorScale (vec, dec, vec);
1581 
1582  if (old->trailcount > 900)
1583  {
1584  orgscale = 4;
1585  velscale = 15;
1586  }
1587  else if (old->trailcount > 800)
1588  {
1589  orgscale = 2;
1590  velscale = 10;
1591  }
1592  else
1593  {
1594  orgscale = 1;
1595  velscale = 5;
1596  }
1597 
1598  while (len > 0)
1599  {
1600  len -= dec;
1601 
1602  if (!free_particles)
1603  return;
1604 
1605  // drop less particles as it flies
1606  if ((rand()&1023) < old->trailcount)
1607  {
1608  p = free_particles;
1609  free_particles = p->next;
1610  p->next = active_particles;
1611  active_particles = p;
1612  VectorClear (p->accel);
1613 
1614  p->time = cl.time;
1615 
1616  if (flags & EF_GIB)
1617  {
1618  p->alpha = 1.0;
1619  p->alphavel = -1.0 / (1+frand()*0.4);
1620 #ifndef QMAX
1621  p->color = 0xe8 + (rand()&7);
1622 #endif
1623  for (j=0 ; j<3 ; j++)
1624  {
1625  p->org[j] = move[j] + crand()*orgscale;
1626  p->vel[j] = crand()*velscale;
1627  p->accel[j] = 0;
1628  }
1629  p->vel[2] -= PARTICLE_GRAVITY;
1630  }
1631  else if (flags & EF_GREENGIB)
1632  {
1633  p->alpha = 1.0;
1634  p->alphavel = -1.0 / (1+frand()*0.4);
1635 #ifndef QMAX
1636  p->color = 0xdb + (rand()&7);
1637 #endif
1638  for (j=0; j< 3; j++)
1639  {
1640  p->org[j] = move[j] + crand()*orgscale;
1641  p->vel[j] = crand()*velscale;
1642  p->accel[j] = 0;
1643  }
1644  p->vel[2] -= PARTICLE_GRAVITY;
1645  }
1646  else
1647  {
1648  p->alpha = 1.0;
1649  p->alphavel = -1.0 / (1+frand()*0.2);
1650 #ifndef QMAX
1651  p->color = 4 + (rand()&7);
1652 #endif
1653  for (j=0 ; j<3 ; j++)
1654  {
1655  p->org[j] = move[j] + crand()*orgscale;
1656  p->vel[j] = crand()*velscale;
1657  }
1658  p->accel[2] = 20;
1659  }
1660  }
1661 
1662  old->trailcount -= 5;
1663  if (old->trailcount < 100)
1664  old->trailcount = 100;
1665  VectorAdd (move, vec, move);
1666  }
1667 }

Referenced by CL_AddPacketEntities(), and CL_RocketTrail().

◆ CL_EntityEvent()

void CL_EntityEvent ( entity_state_t ent)

Definition at line 2410 of file cl_fx.c.

2411 {
2412  switch (ent->event)
2413  {
2414  case EV_ITEM_RESPAWN:
2415  S_StartSound (NULL, ent->number, CHAN_WEAPON, S_RegisterSound("items/respawn1.wav"), 1, ATTN_IDLE, 0);
2417  break;
2418  case EV_PLAYER_TELEPORT:
2419  S_StartSound (NULL, ent->number, CHAN_WEAPON, S_RegisterSound("misc/tele1.wav"), 1, ATTN_IDLE, 0);
2421  break;
2422  case EV_FOOTSTEP:
2423  if (cl_footsteps->value)
2424  S_StartSound (NULL, ent->number, CHAN_BODY, cl_sfx_footsteps[rand()&3], 1, ATTN_NORM, 0);
2425  break;
2426  case EV_FALLSHORT:
2427  S_StartSound (NULL, ent->number, CHAN_AUTO, S_RegisterSound ("player/land1.wav"), 1, ATTN_NORM, 0);
2428  break;
2429  case EV_FALL:
2430  S_StartSound (NULL, ent->number, CHAN_AUTO, S_RegisterSound ("*fall2.wav"), 1, ATTN_NORM, 0);
2431  break;
2432  case EV_FALLFAR:
2433  S_StartSound (NULL, ent->number, CHAN_AUTO, S_RegisterSound ("*fall1.wav"), 1, ATTN_NORM, 0);
2434  break;
2435  }
2436 }

Referenced by CL_FireEntityEvents().

◆ CL_ExplosionParticles()

void CL_ExplosionParticles ( vec3_t  org)

Definition at line 1278 of file cl_fx.c.

1279 {
1280  int i, j;
1281  cparticle_t *p;
1282 
1283  for (i=0 ; i<256 ; i++)
1284  {
1285  if (!free_particles)
1286  return;
1287  p = free_particles;
1288  free_particles = p->next;
1289  p->next = active_particles;
1290  active_particles = p;
1291 
1292  p->time = cl.time;
1293  p->color = 0xe0 + (rand()&7);
1294  for (j=0 ; j<3 ; j++)
1295  {
1296  p->org[j] = org[j] + ((rand()%32)-16);
1297  p->vel[j] = (rand()%384)-192;
1298  }
1299 
1300  p->accel[0] = p->accel[1] = 0;
1301  p->accel[2] = -PARTICLE_GRAVITY;
1302  p->alpha = 1.0;
1303 
1304  p->alphavel = -0.8 / (0.5 + frand()*0.3);
1305  }
1306 }

◆ CL_FlagTrail()

void CL_FlagTrail ( vec3_t  start,
vec3_t  end,
float  color 
)

Definition at line 1511 of file cl_fx.c.

1513 {
1514  vec3_t move;
1515  vec3_t vec;
1516  float len;
1517  int j;
1518  cparticle_t *p;
1519  int dec;
1520 
1521  VectorCopy (start, move);
1522  VectorSubtract (end, start, vec);
1523  len = VectorNormalize (vec);
1524 
1525  dec = 5;
1526  VectorScale (vec, 5, vec);
1527 
1528  while (len > 0)
1529  {
1530  len -= dec;
1531 
1532  if (!free_particles)
1533  return;
1534  p = free_particles;
1535  free_particles = p->next;
1536  p->next = active_particles;
1537  active_particles = p;
1538  VectorClear (p->accel);
1539 
1540  p->time = cl.time;
1541 
1542  p->alpha = 1.0;
1543  p->alphavel = -1.0 / (0.8+frand()*0.2);
1544 #ifndef QMAX
1545  p->color = color;
1546 #endif
1547  for (j=0 ; j<3 ; j++)
1548  {
1549  p->org[j] = move[j] + crand()*16;
1550  p->vel[j] = crand()*5;
1551  p->accel[j] = 0;
1552  }
1553 
1554  VectorAdd (move, vec, move);
1555  }
1556 }

Referenced by CL_AddPacketEntities().

◆ CL_FlyEffect()

void CL_FlyEffect ( centity_t ent,
vec3_t  origin 
)

Definition at line 2026 of file cl_fx.c.

2027 {
2028  int n;
2029  int count;
2030  int starttime;
2031 
2032  if (ent->fly_stoptime < cl.time)
2033  {
2034  starttime = cl.time;
2035  ent->fly_stoptime = cl.time + 60000;
2036  }
2037  else
2038  {
2039  starttime = ent->fly_stoptime - 60000;
2040  }
2041 
2042  n = cl.time - starttime;
2043  if (n < 20000)
2044  count = n * 162 / 20000.0;
2045  else
2046  {
2047  n = ent->fly_stoptime - cl.time;
2048  if (n < 20000)
2049  count = n * 162 / 20000.0;
2050  else
2051  count = 162;
2052  }
2053 
2054  CL_FlyParticles (origin, count);
2055 }

Referenced by CL_AddPacketEntities().

◆ CL_FlyParticles()

void CL_FlyParticles ( vec3_t  origin,
int  count 
)

Definition at line 1962 of file cl_fx.c.

1963 {
1964  int i;
1965  cparticle_t *p;
1966  float angle;
1967  float sr, sp, sy, cr, cp, cy;
1968  vec3_t forward;
1969  float dist = 64;
1970  float ltime;
1971 
1972 
1973  if (count > NUMVERTEXNORMALS)
1975 
1976  if (!avelocities[0][0])
1977  {
1978  for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
1979  avelocities[0][i] = (rand()&255) * 0.01;
1980  }
1981 
1982 
1983  ltime = (float)cl.time / 1000.0;
1984  for (i=0 ; i<count ; i+=2)
1985  {
1986  angle = ltime * avelocities[i][0];
1987  sy = sin(angle);
1988  cy = cos(angle);
1989  angle = ltime * avelocities[i][1];
1990  sp = sin(angle);
1991  cp = cos(angle);
1992  angle = ltime * avelocities[i][2];
1993  sr = sin(angle);
1994  cr = cos(angle);
1995 
1996  forward[0] = cp*cy;
1997  forward[1] = cp*sy;
1998  forward[2] = -sp;
1999 
2000  if (!free_particles)
2001  return;
2002  p = free_particles;
2003  free_particles = p->next;
2004  p->next = active_particles;
2005  active_particles = p;
2006 
2007  p->time = cl.time;
2008 
2009  dist = sin(ltime + i)*64;
2010  p->org[0] = origin[0] + bytedirs[i][0]*dist + forward[0]*BEAMLENGTH;
2011  p->org[1] = origin[1] + bytedirs[i][1]*dist + forward[1]*BEAMLENGTH;
2012  p->org[2] = origin[2] + bytedirs[i][2]*dist + forward[2]*BEAMLENGTH;
2013 
2014  VectorClear (p->vel);
2015  VectorClear (p->accel);
2016 
2017 #ifndef QMAX
2018  p->color = 0;
2019  p->colorvel = 0;
2020 #endif
2021  p->alpha = 1;
2022  p->alphavel = -100;
2023  }
2024 }

Referenced by CL_FlyEffect().

◆ CL_IonripperTrail()

void CL_IonripperTrail ( vec3_t  start,
vec3_t  ent 
)

Definition at line 1844 of file cl_fx.c.

1845 {
1846  vec3_t move;
1847  vec3_t vec;
1848  float len;
1849  int j;
1850  cparticle_t *p;
1851  int dec;
1852  int left = 0;
1853 
1854  VectorCopy (start, move);
1855  VectorSubtract (ent, start, vec);
1856  len = VectorNormalize (vec);
1857 
1858  dec = 5;
1859  VectorScale (vec, 5, vec);
1860 
1861  while (len > 0)
1862  {
1863  len -= dec;
1864 
1865  if (!free_particles)
1866  return;
1867  p = free_particles;
1868  free_particles = p->next;
1869  p->next = active_particles;
1870  active_particles = p;
1871  VectorClear (p->accel);
1872 
1873  p->time = cl.time;
1874  p->alpha = 0.5;
1875  p->alphavel = -1.0 / (0.3 + frand() * 0.2);
1876 #ifndef QMAX
1877  p->color = 0xe4 + (rand()&3);
1878 #endif
1879  for (j=0; j<3; j++)
1880  {
1881  p->org[j] = move[j];
1882  p->accel[j] = 0;
1883  }
1884  if (left)
1885  {
1886  left = 0;
1887  p->vel[0] = 10;
1888  }
1889  else
1890  {
1891  left = 1;
1892  p->vel[0] = -10;
1893  }
1894 
1895  p->vel[1] = 0;
1896  p->vel[2] = 0;
1897 
1898  VectorAdd (move, vec, move);
1899  }
1900 }

Referenced by CL_AddPacketEntities().

◆ CL_ItemRespawnParticles()

void CL_ItemRespawnParticles ( vec3_t  org)

Definition at line 1239 of file cl_fx.c.

1240 {
1241  int i, j;
1242  cparticle_t *p;
1243 
1244  for (i=0 ; i<64 ; i++)
1245  {
1246  if (!free_particles)
1247  return;
1248  p = free_particles;
1249  free_particles = p->next;
1250  p->next = active_particles;
1251  active_particles = p;
1252 
1253  p->time = cl.time;
1254 #ifndef QMAX
1255  p->color = 0xd4 + (rand()&3); // green
1256 #endif
1257  p->org[0] = org[0] + crand()*8;
1258  p->org[1] = org[1] + crand()*8;
1259  p->org[2] = org[2] + crand()*8;
1260 
1261  for (j=0 ; j<3 ; j++)
1262  p->vel[j] = crand()*8;
1263 
1264  p->accel[0] = p->accel[1] = 0;
1265  p->accel[2] = -PARTICLE_GRAVITY*0.2;
1266  p->alpha = 1.0;
1267 
1268  p->alphavel = -1.0 / (1.0 + frand()*0.3);
1269  }
1270 }

Referenced by CL_EntityEvent().

◆ CL_LogoutEffect()

void CL_LogoutEffect ( vec3_t  org,
int  type 
)

Definition at line 1192 of file cl_fx.c.

1193 {
1194  int i, j;
1195  cparticle_t *p;
1196 
1197  for (i=0 ; i<500 ; i++)
1198  {
1199  if (!free_particles)
1200  return;
1201  p = free_particles;
1202  free_particles = p->next;
1203  p->next = active_particles;
1204  active_particles = p;
1205 
1206  p->time = cl.time;
1207 
1208 #ifndef QMAX
1209  if (type == MZ_LOGIN)
1210  p->color = 0xd0 + (rand()&7); // green
1211  else if (type == MZ_LOGOUT)
1212  p->color = 0x40 + (rand()&7); // red
1213  else
1214  p->color = 0xe0 + (rand()&7); // yellow
1215 #endif
1216 
1217  p->org[0] = org[0] - 16 + frand()*32;
1218  p->org[1] = org[1] - 16 + frand()*32;
1219  p->org[2] = org[2] - 24 + frand()*56;
1220 
1221  for (j=0 ; j<3 ; j++)
1222  p->vel[j] = crand()*20;
1223 
1224  p->accel[0] = p->accel[1] = 0;
1225  p->accel[2] = -PARTICLE_GRAVITY;
1226  p->alpha = 1.0;
1227 
1228  p->alphavel = -1.0 / (1.0 + frand()*0.3);
1229  }
1230 }

Referenced by CL_ParseMuzzleFlash().

◆ CL_NewDlight()

void CL_NewDlight ( int  key,
float  x,
float  y,
float  z,
float  radius,
float  time 
)

Definition at line 292 of file cl_fx.c.

293 {
294  cdlight_t *dl;
295 
296  dl = CL_AllocDlight (key);
297  dl->origin[0] = x;
298  dl->origin[1] = y;
299  dl->origin[2] = z;
300  dl->radius = radius;
301  dl->die = cl.time + time;
302 }

◆ CL_ParseMuzzleFlash()

void CL_ParseMuzzleFlash ( void  )

Definition at line 338 of file cl_fx.c.

339 {
340  vec3_t fv, rv;
341  cdlight_t *dl;
342  int i, weapon;
343  centity_t *pl;
344  int silenced;
345  float volume;
346  char soundname[64];
347 
349  if (i < 1 || i >= MAX_EDICTS)
350  Com_Error (ERR_DROP, "CL_ParseMuzzleFlash: bad entity");
351 
352  weapon = MSG_ReadByte (&net_message);
353  silenced = weapon & MZ_SILENCED;
354  weapon &= ~MZ_SILENCED;
355 
356  pl = &cl_entities[i];
357 
358  dl = CL_AllocDlight (i);
359  VectorCopy (pl->current.origin, dl->origin);
360  AngleVectors (pl->current.angles, fv, rv, NULL);
361  VectorMA (dl->origin, 18, fv, dl->origin);
362  VectorMA (dl->origin, 16, rv, dl->origin);
363  if (silenced)
364  dl->radius = 100 + (rand()&31);
365  else
366  dl->radius = 200 + (rand()&31);
367  dl->minlight = 32;
368  dl->die = cl.time; // + 0.1;
369 
370  if (silenced)
371  volume = 0.2;
372  else
373  volume = 1;
374 
375  switch (weapon)
376  {
377  case MZ_BLASTER:
378  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
379  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/blastf1a.wav"), volume, ATTN_NORM, 0);
380  break;
381  case MZ_BLUEHYPERBLASTER:
382  dl->color[0] = 0;dl->color[1] = 0;dl->color[2] = 1;
383  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/hyprbf1a.wav"), volume, ATTN_NORM, 0);
384  break;
385  case MZ_HYPERBLASTER:
386  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
387  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/hyprbf1a.wav"), volume, ATTN_NORM, 0);
388  break;
389  case MZ_MACHINEGUN:
390  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
391  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
392  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
393  break;
394  case MZ_SHOTGUN:
395  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
396  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/shotgf1b.wav"), volume, ATTN_NORM, 0);
397  S_StartSound (NULL, i, CHAN_AUTO, S_RegisterSound("weapons/shotgr1b.wav"), volume, ATTN_NORM, 0.1);
398  break;
399  case MZ_SSHOTGUN:
400  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
401  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/sshotf1b.wav"), volume, ATTN_NORM, 0);
402  break;
403  case MZ_CHAINGUN1:
404  dl->radius = 200 + (rand()&31);
405  dl->color[0] = 1;dl->color[1] = 0.25;dl->color[2] = 0;
406  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
407  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
408  break;
409  case MZ_CHAINGUN2:
410  dl->radius = 225 + (rand()&31);
411  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
412  dl->die = cl.time + 0.1; // long delay
413  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
414  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
415  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
416  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0.05);
417  break;
418  case MZ_CHAINGUN3:
419  dl->radius = 250 + (rand()&31);
420  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
421  dl->die = cl.time + 0.1; // long delay
422  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
423  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
424  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
425  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0.033);
426  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
427  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0.066);
428  break;
429  case MZ_RAILGUN:
430  dl->color[0] = 0.5;dl->color[1] = 0.5;dl->color[2] = 1.0;
431  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/railgf1a.wav"), volume, ATTN_NORM, 0);
432  break;
433  case MZ_ROCKET:
434  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
435  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/rocklf1a.wav"), volume, ATTN_NORM, 0);
436  S_StartSound (NULL, i, CHAN_AUTO, S_RegisterSound("weapons/rocklr1b.wav"), volume, ATTN_NORM, 0.1);
437  break;
438  case MZ_GRENADE:
439  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
440  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), volume, ATTN_NORM, 0);
441  S_StartSound (NULL, i, CHAN_AUTO, S_RegisterSound("weapons/grenlr1b.wav"), volume, ATTN_NORM, 0.1);
442  break;
443  case MZ_BFG:
444  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
445  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/bfg__f1y.wav"), volume, ATTN_NORM, 0);
446  break;
447 
448  case MZ_LOGIN:
449  dl->color[0] = 0;dl->color[1] = 1; dl->color[2] = 0;
450  dl->die = cl.time + 1.0;
451  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), 1, ATTN_NORM, 0);
452  CL_LogoutEffect (pl->current.origin, weapon);
453  break;
454  case MZ_LOGOUT:
455  dl->color[0] = 1;dl->color[1] = 0; dl->color[2] = 0;
456  dl->die = cl.time + 1.0;
457  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), 1, ATTN_NORM, 0);
458  CL_LogoutEffect (pl->current.origin, weapon);
459  break;
460  case MZ_RESPAWN:
461  dl->color[0] = 1;dl->color[1] = 1; dl->color[2] = 0;
462  dl->die = cl.time + 1.0;
463  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), 1, ATTN_NORM, 0);
464  CL_LogoutEffect (pl->current.origin, weapon);
465  break;
466  // RAFAEL
467  case MZ_PHALANX:
468  dl->color[0] = 1;dl->color[1] = 0.5; dl->color[2] = 0.5;
469  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/plasshot.wav"), volume, ATTN_NORM, 0);
470  break;
471  // RAFAEL
472  case MZ_IONRIPPER:
473  dl->color[0] = 1;dl->color[1] = 0.5; dl->color[2] = 0.5;
474  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/rippfire.wav"), volume, ATTN_NORM, 0);
475  break;
476 
477 // ======================
478 // PGM
479  case MZ_ETF_RIFLE:
480  dl->color[0] = 0.9;dl->color[1] = 0.7;dl->color[2] = 0;
481  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/nail1.wav"), volume, ATTN_NORM, 0);
482  break;
483  case MZ_SHOTGUN2:
484  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
485  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/shotg2.wav"), volume, ATTN_NORM, 0);
486  break;
487  case MZ_HEATBEAM:
488  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
489  dl->die = cl.time + 100;
490 // S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/bfg__l1a.wav"), volume, ATTN_NORM, 0);
491  break;
492  case MZ_BLASTER2:
493  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
494  // FIXME - different sound for blaster2 ??
495  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/blastf1a.wav"), volume, ATTN_NORM, 0);
496  break;
497  case MZ_TRACKER:
498  // negative flashes handled the same in gl/soft until CL_AddDLights
499  dl->color[0] = -1;dl->color[1] = -1;dl->color[2] = -1;
500  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/disint2.wav"), volume, ATTN_NORM, 0);
501  break;
502  case MZ_NUKE1:
503  dl->color[0] = 1;dl->color[1] = 0;dl->color[2] = 0;
504  dl->die = cl.time + 100;
505  break;
506  case MZ_NUKE2:
507  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
508  dl->die = cl.time + 100;
509  break;
510  case MZ_NUKE4:
511  dl->color[0] = 0;dl->color[1] = 0;dl->color[2] = 1;
512  dl->die = cl.time + 100;
513  break;
514  case MZ_NUKE8:
515  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 1;
516  dl->die = cl.time + 100;
517  break;
518 // PGM
519 // ======================
520  }
521 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseMuzzleFlash2()

void CL_ParseMuzzleFlash2 ( void  )

Definition at line 529 of file cl_fx.c.

530 {
531  int ent;
532  vec3_t origin;
533  int flash_number;
534  cdlight_t *dl;
536  char soundname[64];
537 
538  ent = MSG_ReadShort (&net_message);
539  if (ent < 1 || ent >= MAX_EDICTS)
540  Com_Error (ERR_DROP, "CL_ParseMuzzleFlash2: bad entity");
541 
542  flash_number = MSG_ReadByte (&net_message);
543 
544  // locate the origin
546  origin[0] = cl_entities[ent].current.origin[0] + forward[0] * monster_flash_offset[flash_number][0] + right[0] * monster_flash_offset[flash_number][1];
547  origin[1] = cl_entities[ent].current.origin[1] + forward[1] * monster_flash_offset[flash_number][0] + right[1] * monster_flash_offset[flash_number][1];
548  origin[2] = cl_entities[ent].current.origin[2] + forward[2] * monster_flash_offset[flash_number][0] + right[2] * monster_flash_offset[flash_number][1] + monster_flash_offset[flash_number][2];
549 
550  dl = CL_AllocDlight (ent);
551  VectorCopy (origin, dl->origin);
552  dl->radius = 200 + (rand()&31);
553  dl->minlight = 32;
554  dl->die = cl.time; // + 0.1;
555 
556  switch (flash_number)
557  {
571  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
572  CL_ParticleEffect (origin, vec3_origin, 0, 40);
573  CL_SmokeAndFlash(origin);
574  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
575  break;
576 
585  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
586  CL_ParticleEffect (origin, vec3_origin, 0, 40);
587  CL_SmokeAndFlash(origin);
588  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck3.wav"), 1, ATTN_NORM, 0);
589  break;
590 
599  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
600  CL_ParticleEffect (origin, vec3_origin, 0, 40);
601  CL_SmokeAndFlash(origin);
602  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("gunner/gunatck2.wav"), 1, ATTN_NORM, 0);
603  break;
604 
612  case MZ2_TURRET_MACHINEGUN: // PGM
613  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
614 
615  CL_ParticleEffect (origin, vec3_origin, 0, 40);
616  CL_SmokeAndFlash(origin);
617  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
618  break;
619 
625  case MZ2_CARRIER_MACHINEGUN_L1: // PMM
626  case MZ2_CARRIER_MACHINEGUN_L2: // PMM
627  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
628 
629  CL_ParticleEffect (origin, vec3_origin, 0, 40);
630  CL_SmokeAndFlash(origin);
631  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NONE, 0);
632  break;
633 
642  case MZ2_TURRET_BLASTER: // PGM
643  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
644  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck2.wav"), 1, ATTN_NORM, 0);
645  break;
646 
647  case MZ2_FLYER_BLASTER_1:
648  case MZ2_FLYER_BLASTER_2:
649  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
650  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("flyer/flyatck3.wav"), 1, ATTN_NORM, 0);
651  break;
652 
653  case MZ2_MEDIC_BLASTER_1:
654  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
655  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("medic/medatck1.wav"), 1, ATTN_NORM, 0);
656  break;
657 
658  case MZ2_HOVER_BLASTER_1:
659  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
660  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("hover/hovatck1.wav"), 1, ATTN_NORM, 0);
661  break;
662 
663  case MZ2_FLOAT_BLASTER_1:
664  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
665  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("floater/fltatck1.wav"), 1, ATTN_NORM, 0);
666  break;
667 
676  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
677  CL_SmokeAndFlash(origin);
678  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck1.wav"), 1, ATTN_NORM, 0);
679  break;
680 
681  case MZ2_TANK_BLASTER_1:
682  case MZ2_TANK_BLASTER_2:
683  case MZ2_TANK_BLASTER_3:
684  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
685  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
686  break;
687 
707  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
708  CL_ParticleEffect (origin, vec3_origin, 0, 40);
709  CL_SmokeAndFlash(origin);
710  Com_sprintf(soundname, sizeof(soundname), "tank/tnkatk2%c.wav", 'a' + rand() % 5);
711  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound(soundname), 1, ATTN_NORM, 0);
712  break;
713 
714  case MZ2_CHICK_ROCKET_1:
715  case MZ2_TURRET_ROCKET: // PGM
716  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
717  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("chick/chkatck2.wav"), 1, ATTN_NORM, 0);
718  break;
719 
720  case MZ2_TANK_ROCKET_1:
721  case MZ2_TANK_ROCKET_2:
722  case MZ2_TANK_ROCKET_3:
723  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
724  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck1.wav"), 1, ATTN_NORM, 0);
725  break;
726 
730  case MZ2_BOSS2_ROCKET_1:
731  case MZ2_BOSS2_ROCKET_2:
732  case MZ2_BOSS2_ROCKET_3:
733  case MZ2_BOSS2_ROCKET_4:
735 // case MZ2_CARRIER_ROCKET_2:
736 // case MZ2_CARRIER_ROCKET_3:
737 // case MZ2_CARRIER_ROCKET_4:
738  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
739  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/rocket.wav"), 1, ATTN_NORM, 0);
740  break;
741 
746  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
747  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("gunner/gunatck3.wav"), 1, ATTN_NORM, 0);
748  break;
749 
751  // PMM
752  case MZ2_CARRIER_RAILGUN:
753  case MZ2_WIDOW_RAIL:
754  // pmm
755  dl->color[0] = 0.5;dl->color[1] = 0.5;dl->color[2] = 1.0;
756  break;
757 
758 // --- Xian's shit starts ---
759  case MZ2_MAKRON_BFG:
760  dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
761  //S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/bfg_fire.wav"), 1, ATTN_NORM, 0);
762  break;
763 
781  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
782  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/blaster.wav"), 1, ATTN_NORM, 0);
783  break;
784 
791  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
792  CL_ParticleEffect (origin, vec3_origin, 0, 40);
793  CL_SmokeAndFlash(origin);
794  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("boss3/xfire.wav"), 1, ATTN_NORM, 0);
795  break;
796 
803  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
804  CL_ParticleEffect (origin, vec3_origin, 0, 40);
805  CL_SmokeAndFlash(origin);
806  break;
807 
808  case MZ2_JORG_BFG_1:
809  dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
810  break;
811 
817  case MZ2_CARRIER_MACHINEGUN_R1: // PMM
818  case MZ2_CARRIER_MACHINEGUN_R2: // PMM
819 
820  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
821 
822  CL_ParticleEffect (origin, vec3_origin, 0, 40);
823  CL_SmokeAndFlash(origin);
824  break;
825 
826 // ======
827 // ROGUE
828  case MZ2_STALKER_BLASTER:
830  case MZ2_MEDIC_BLASTER_2:
831  case MZ2_WIDOW_BLASTER:
851  case MZ2_WIDOW_BLASTER_0:
859  case MZ2_WIDOW_RUN_1:
860  case MZ2_WIDOW_RUN_2:
861  case MZ2_WIDOW_RUN_3:
862  case MZ2_WIDOW_RUN_4:
863  case MZ2_WIDOW_RUN_5:
864  case MZ2_WIDOW_RUN_6:
865  case MZ2_WIDOW_RUN_7:
866  case MZ2_WIDOW_RUN_8:
867  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
868  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
869  break;
870 
871  case MZ2_WIDOW_DISRUPTOR:
872  dl->color[0] = -1;dl->color[1] = -1;dl->color[2] = -1;
873  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("weapons/disint2.wav"), 1, ATTN_NORM, 0);
874  break;
875 
877  case MZ2_WIDOW2_BEAMER_1:
878  case MZ2_WIDOW2_BEAMER_2:
879  case MZ2_WIDOW2_BEAMER_3:
880  case MZ2_WIDOW2_BEAMER_4:
881  case MZ2_WIDOW2_BEAMER_5:
893  dl->radius = 300 + (rand()&100);
894  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
895  dl->die = cl.time + 200;
896  break;
897 // ROGUE
898 // ======
899 
900 // --- Xian's shit ends ---
901 
902  }
903 }

Referenced by CL_ParseServerMessage().

◆ CL_ParticleEffect()

void CL_ParticleEffect ( vec3_t  org,
vec3_t  dir,
int  color,
int  count 
)

Definition at line 1011 of file cl_fx.c.

1012 {
1013  int i, j;
1014  cparticle_t *p;
1015  float d;
1016 
1017  for (i=0 ; i<count ; i++)
1018  {
1019  if (!free_particles)
1020  return;
1021  p = free_particles;
1022  free_particles = p->next;
1023  p->next = active_particles;
1024  active_particles = p;
1025 
1026  p->time = cl.time;
1027 #ifdef QMAX
1028  p->color[0] = color + (rand()&7);
1029  p->color[1] = color + (rand()&7);
1030  p->color[2] = color + (rand()&7);
1031 #else
1032  p->color = color + (rand()&7);
1033 #endif
1034  d = rand()&31;
1035  for (j=0 ; j<3 ; j++)
1036  {
1037  p->org[j] = org[j] + ((rand()&7)-4) + d*dir[j];
1038  p->vel[j] = crand()*20;
1039  }
1040 
1041  p->accel[0] = p->accel[1] = 0;
1042  p->accel[2] = -PARTICLE_GRAVITY;
1043  p->alpha = 1.0;
1044 
1045  p->alphavel = -1.0 / (0.5 + frand()*0.3);
1046  }
1047 }

Referenced by CL_ParseMuzzleFlash2(), CL_ParseParticles(), and CL_ParseTEnt().

◆ CL_ParticleEffect2()

void CL_ParticleEffect2 ( vec3_t  org,
vec3_t  dir,
int  color,
int  count 
)

Definition at line 1055 of file cl_fx.c.

1056 {
1057  int i, j;
1058  cparticle_t *p;
1059  float d;
1060 
1061  for (i=0 ; i<count ; i++)
1062  {
1063  if (!free_particles)
1064  return;
1065  p = free_particles;
1066  free_particles = p->next;
1067  p->next = active_particles;
1068  active_particles = p;
1069 
1070  p->time = cl.time;
1071 #ifdef QMAX
1072  p->color[0] = color;
1073  p->color[1] = color;
1074  p->color[2] = color;
1075 #else
1076  p->color = color;
1077 #endif
1078 
1079  d = rand()&7;
1080  for (j=0 ; j<3 ; j++)
1081  {
1082  p->org[j] = org[j] + ((rand()&7)-4) + d*dir[j];
1083  p->vel[j] = crand()*20;
1084  }
1085 
1086  p->accel[0] = p->accel[1] = 0;
1087  p->accel[2] = -PARTICLE_GRAVITY;
1088  p->alpha = 1.0;
1089 
1090  p->alphavel = -1.0 / (0.5 + frand()*0.3);
1091  }
1092 }

Referenced by CL_ParseTEnt().

◆ CL_ParticleEffect3()

void CL_ParticleEffect3 ( vec3_t  org,
vec3_t  dir,
int  color,
int  count 
)

Definition at line 1101 of file cl_fx.c.

1102 {
1103  int i, j;
1104  cparticle_t *p;
1105  float d;
1106 
1107  for (i=0 ; i<count ; i++)
1108  {
1109  if (!free_particles)
1110  return;
1111  p = free_particles;
1112  free_particles = p->next;
1113  p->next = active_particles;
1114  active_particles = p;
1115 
1116  p->time = cl.time;
1117 #ifdef QMAX
1118  p->color[0] = color;
1119  p->color[1] = color;
1120  p->color[2] = color;
1121 #else
1122  p->color = color;
1123 #endif
1124 
1125  d = rand()&7;
1126  for (j=0 ; j<3 ; j++)
1127  {
1128  p->org[j] = org[j] + ((rand()&7)-4) + d*dir[j];
1129  p->vel[j] = crand()*20;
1130  }
1131 
1132  p->accel[0] = p->accel[1] = 0;
1133  p->accel[2] = PARTICLE_GRAVITY;
1134  p->alpha = 1.0;
1135 
1136  p->alphavel = -1.0 / (0.5 + frand()*0.3);
1137  }
1138 }

Referenced by CL_ParseTEnt().

◆ CL_QuadTrail()

void CL_QuadTrail ( vec3_t  start,
vec3_t  end 
)

Definition at line 1456 of file cl_fx.c.

1457 {
1458  vec3_t move;
1459  vec3_t vec;
1460  float len;
1461  int j;
1462  cparticle_t *p;
1463  int dec;
1464 
1465  VectorCopy (start, move);
1466  VectorSubtract (end, start, vec);
1467  len = VectorNormalize (vec);
1468 
1469  dec = 5;
1470  VectorScale (vec, 5, vec);
1471 
1472  while (len > 0)
1473  {
1474  len -= dec;
1475 
1476  if (!free_particles)
1477  return;
1478  p = free_particles;
1479  free_particles = p->next;
1480  p->next = active_particles;
1481  active_particles = p;
1482  VectorClear (p->accel);
1483 
1484  p->time = cl.time;
1485 
1486  p->alpha = 1.0;
1487  p->alphavel = -1.0 / (0.8+frand()*0.2);
1488 #ifndef QMAX
1489  p->color = 115;
1490 #endif
1491  for (j=0 ; j<3 ; j++)
1492  {
1493  p->org[j] = move[j] + crand()*16;
1494  p->vel[j] = crand()*5;
1495  p->accel[j] = 0;
1496  }
1497 
1498  VectorAdd (move, vec, move);
1499  }
1500 }

◆ CL_RailTrail()

void CL_RailTrail ( vec3_t  start,
vec3_t  end 
)

Definition at line 1750 of file cl_fx.c.

1751 {
1752  vec3_t move;
1753  vec3_t vec;
1754  float len;
1755  int j;
1756  cparticle_t *p;
1757  float dec;
1758  vec3_t right, up;
1759  int i;
1760  float d, c, s;
1761  vec3_t dir;
1762  byte clr = 0x74;
1763 
1764  VectorCopy (start, move);
1765  VectorSubtract (end, start, vec);
1766  len = VectorNormalize (vec);
1767 
1768  MakeNormalVectors (vec, right, up);
1769 
1770  for (i=0 ; i<len ; i++)
1771  {
1772  if (!free_particles)
1773  return;
1774 
1775  p = free_particles;
1776  free_particles = p->next;
1777  p->next = active_particles;
1778  active_particles = p;
1779 
1780  p->time = cl.time;
1781  VectorClear (p->accel);
1782 
1783  d = i * 0.1;
1784  c = cos(d);
1785  s = sin(d);
1786 
1787  VectorScale (right, c, dir);
1788  VectorMA (dir, s, up, dir);
1789 
1790  p->alpha = 1.0;
1791  p->alphavel = -1.0 / (1+frand()*0.2);
1792 #ifndef QMAX
1793  p->color = clr + (rand()&7);
1794 #endif
1795  for (j=0 ; j<3 ; j++)
1796  {
1797  p->org[j] = move[j] + dir[j]*3;
1798  p->vel[j] = dir[j]*6;
1799  }
1800 
1801  VectorAdd (move, vec, move);
1802  }
1803 
1804  dec = 0.75;
1805  VectorScale (vec, dec, vec);
1806  VectorCopy (start, move);
1807 
1808  while (len > 0)
1809  {
1810  len -= dec;
1811 
1812  if (!free_particles)
1813  return;
1814  p = free_particles;
1815  free_particles = p->next;
1816  p->next = active_particles;
1817  active_particles = p;
1818 
1819  p->time = cl.time;
1820  VectorClear (p->accel);
1821 
1822  p->alpha = 1.0;
1823  p->alphavel = -1.0 / (0.6+frand()*0.2);
1824 #ifndef QMAX
1825  p->color = 0x0 + (rand()&15);
1826 #endif
1827  for (j=0 ; j<3 ; j++)
1828  {
1829  p->org[j] = move[j] + crand()*3;
1830  p->vel[j] = crand()*3;
1831  p->accel[j] = 0;
1832  }
1833 
1834  VectorAdd (move, vec, move);
1835  }
1836 }

Referenced by CL_ParseTEnt().

◆ CL_RocketTrail()

void CL_RocketTrail ( vec3_t  start,
vec3_t  end,
centity_t old 
)

Definition at line 1691 of file cl_fx.c.

1692 {
1693  vec3_t move;
1694  vec3_t vec;
1695  float len;
1696  int j;
1697  cparticle_t *p;
1698  float dec;
1699 
1700  // smoke
1701  CL_DiminishingTrail (start, end, old, EF_ROCKET);
1702 
1703  // fire
1704  VectorCopy (start, move);
1705  VectorSubtract (end, start, vec);
1706  len = VectorNormalize (vec);
1707 
1708  dec = 1;
1709  VectorScale (vec, dec, vec);
1710 
1711  while (len > 0)
1712  {
1713  len -= dec;
1714 
1715  if (!free_particles)
1716  return;
1717 
1718  if ( (rand()&7) == 0)
1719  {
1720  p = free_particles;
1721  free_particles = p->next;
1722  p->next = active_particles;
1723  active_particles = p;
1724 
1725  VectorClear (p->accel);
1726  p->time = cl.time;
1727 
1728  p->alpha = 1.0;
1729  p->alphavel = -1.0 / (1+frand()*0.2);
1730 #ifndef QMAX
1731  p->color = 0xdc + (rand()&3);
1732 #endif
1733  for (j=0 ; j<3 ; j++)
1734  {
1735  p->org[j] = move[j] + crand()*5;
1736  p->vel[j] = crand()*20;
1737  }
1738  p->accel[2] = -PARTICLE_GRAVITY;
1739  }
1740  VectorAdd (move, vec, move);
1741  }
1742 }

Referenced by CL_AddPacketEntities().

◆ CL_RunDLights()

void CL_RunDLights ( void  )

Definition at line 311 of file cl_fx.c.

312 {
313  int i;
314  cdlight_t *dl;
315 
316  dl = cl_dlights;
317  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
318  {
319  if (!dl->radius)
320  continue;
321 
322  if (dl->die < cl.time)
323  {
324  dl->radius = 0;
325  return;
326  }
327  dl->radius -= cls.frametime*dl->decay;
328  if (dl->radius < 0)
329  dl->radius = 0;
330  }
331 }

Referenced by CL_Frame().

◆ CL_RunLightStyles()

void CL_RunLightStyles ( void  )

Definition at line 166 of file cl_fx.c.

167 {
168  int ofs;
169  int i;
170  clightstyle_t *ls;
171 
172  ofs = cl.time / 100;
173  if (ofs == lastofs)
174  return;
175  lastofs = ofs;
176 
177  for (i=0,ls=cl_lightstyle ; i<MAX_LIGHTSTYLES ; i++, ls++)
178  {
179  if (!ls->length)
180  {
181  ls->value[0] = ls->value[1] = ls->value[2] = 1.0;
182  continue;
183  }
184  if (ls->length == 1)
185  ls->value[0] = ls->value[1] = ls->value[2] = ls->map[0];
186  else
187  ls->value[0] = ls->value[1] = ls->value[2] = ls->map[ofs%ls->length];
188  }
189 }

Referenced by CL_Frame().

◆ CL_SetLightstyle()

void CL_SetLightstyle ( int  i)

Definition at line 192 of file cl_fx.c.

193 {
194  char *s;
195  int j, k;
196 
198 
199  j = strlen (s);
200  if (j >= MAX_QPATH)
201  Com_Error (ERR_DROP, "svc_lightstyle length=%i", j);
202 
203  cl_lightstyle[i].length = j;
204 
205  for (k=0 ; k<j ; k++)
206  cl_lightstyle[i].map[k] = (float)(s[k]-'a')/(float)('m'-'a');
207 }

Referenced by CL_ParseConfigString().

◆ CL_TeleporterParticles()

void CL_TeleporterParticles ( entity_state_t ent)

Definition at line 1145 of file cl_fx.c.

1146 {
1147  int i, j;
1148  cparticle_t *p;
1149 
1150  for (i=0 ; i<8 ; i++)
1151  {
1152  if (!free_particles)
1153  return;
1154  p = free_particles;
1155  free_particles = p->next;
1156  p->next = active_particles;
1157  active_particles = p;
1158 
1159  p->time = cl.time;
1160 #ifdef QMAX
1161  p->color[0] = 0xdb;
1162  p->color[1] = 0xdb;
1163  p->color[2] = 0xdb;
1164 #else
1165  p->color = 0xdb;
1166 #endif
1167 
1168  for (j=0 ; j<2 ; j++)
1169  {
1170  p->org[j] = ent->origin[j] - 16 + (rand()&31);
1171  p->vel[j] = crand()*14;
1172  }
1173 
1174  p->org[2] = ent->origin[2] - 8 + (rand()&7);
1175  p->vel[2] = 80 + (rand()&7);
1176 
1177  p->accel[0] = p->accel[1] = 0;
1178  p->accel[2] = -PARTICLE_GRAVITY;
1179  p->alpha = 1.0;
1180 
1181  p->alphavel = -0.5;
1182  }
1183 }

Referenced by CL_FireEntityEvents().

◆ CL_TeleportParticles()

void CL_TeleportParticles ( vec3_t  org)

Definition at line 2284 of file cl_fx.c.

2285 {
2286  int i, j, k;
2287  cparticle_t *p;
2288  float vel;
2289  vec3_t dir;
2290 
2291  for (i=-16 ; i<=16 ; i+=4)
2292  for (j=-16 ; j<=16 ; j+=4)
2293  for (k=-16 ; k<=32 ; k+=4)
2294  {
2295  if (!free_particles)
2296  return;
2297  p = free_particles;
2298  free_particles = p->next;
2299  p->next = active_particles;
2300  active_particles = p;
2301 
2302  p->time = cl.time;
2303 #ifndef QMAX
2304  p->color = 7 + (rand()&7);
2305 #endif
2306  p->alpha = 1.0;
2307  p->alphavel = -1.0 / (0.3 + (rand()&7) * 0.02);
2308 
2309  p->org[0] = org[0] + i + (rand()&3);
2310  p->org[1] = org[1] + j + (rand()&3);
2311  p->org[2] = org[2] + k + (rand()&3);
2312 
2313  dir[0] = j*8;
2314  dir[1] = i*8;
2315  dir[2] = k*8;
2316 
2317  VectorNormalize (dir);
2318  vel = 50 + (rand()&63);
2319  VectorScale (dir, vel, p->vel);
2320 
2321  p->accel[0] = p->accel[1] = 0;
2322  p->accel[2] = -PARTICLE_GRAVITY;
2323  }
2324 }

Referenced by CL_EntityEvent().

◆ CL_TrapParticles()

void CL_TrapParticles ( entity_t ent)

Definition at line 2135 of file cl_fx.c.

2136 {
2137  vec3_t move;
2138  vec3_t vec;
2139  vec3_t start, end;
2140  float len;
2141  int j;
2142  cparticle_t *p;
2143  int dec;
2144 
2145  ent->origin[2]-=14;
2146  VectorCopy (ent->origin, start);
2147  VectorCopy (ent->origin, end);
2148  end[2]+=64;
2149 
2150  VectorCopy (start, move);
2151  VectorSubtract (end, start, vec);
2152  len = VectorNormalize (vec);
2153 
2154  dec = 5;
2155  VectorScale (vec, 5, vec);
2156 
2157  // FIXME: this is a really silly way to have a loop
2158  while (len > 0)
2159  {
2160  len -= dec;
2161 
2162  if (!free_particles)
2163  return;
2164  p = free_particles;
2165  free_particles = p->next;
2166  p->next = active_particles;
2167  active_particles = p;
2168  VectorClear (p->accel);
2169 
2170  p->time = cl.time;
2171 
2172  p->alpha = 1.0;
2173  p->alphavel = -1.0 / (0.3+frand()*0.2);
2174 #ifndef QMAX
2175  p->color = 0xe0;
2176 #endif
2177  for (j=0 ; j<3 ; j++)
2178  {
2179  p->org[j] = move[j] + crand();
2180  p->vel[j] = crand()*15;
2181  p->accel[j] = 0;
2182  }
2183  p->accel[2] = PARTICLE_GRAVITY;
2184 
2185  VectorAdd (move, vec, move);
2186  }
2187 
2188  {
2189 
2190 
2191  int i, j, k;
2192  cparticle_t *p;
2193  float vel;
2194  vec3_t dir;
2195  vec3_t org;
2196 
2197 
2198  ent->origin[2]+=14;
2199  VectorCopy (ent->origin, org);
2200 
2201 
2202  for (i=-2 ; i<=2 ; i+=4)
2203  for (j=-2 ; j<=2 ; j+=4)
2204  for (k=-2 ; k<=4 ; k+=4)
2205  {
2206  if (!free_particles)
2207  return;
2208  p = free_particles;
2209  free_particles = p->next;
2210  p->next = active_particles;
2211  active_particles = p;
2212 
2213  p->time = cl.time;
2214 #ifndef QMAX
2215  p->color = 0xe0 + (rand()&3);
2216 #endif
2217  p->alpha = 1.0;
2218  p->alphavel = -1.0 / (0.3 + (rand()&7) * 0.02);
2219 
2220  p->org[0] = org[0] + i + ((rand()&23) * crand());
2221  p->org[1] = org[1] + j + ((rand()&23) * crand());
2222  p->org[2] = org[2] + k + ((rand()&23) * crand());
2223 
2224  dir[0] = j * 8;
2225  dir[1] = i * 8;
2226  dir[2] = k * 8;
2227 
2228  VectorNormalize (dir);
2229  vel = 50 + (rand()&63);
2230  VectorScale (dir, vel, p->vel);
2231 
2232  p->accel[0] = p->accel[1] = 0;
2233  p->accel[2] = -PARTICLE_GRAVITY;
2234  }
2235  }
2236 }

Referenced by CL_AddPacketEntities().

◆ MakeNormalVectors()

void MakeNormalVectors ( vec3_t  forward,
vec3_t  right,
vec3_t  up 
)

Definition at line 1669 of file cl_fx.c.

1670 {
1671  float d;
1672 
1673  // this rotate and negat guarantees a vector
1674  // not colinear with the original
1675  right[1] = -forward[0];
1676  right[2] = forward[1];
1677  right[0] = forward[2];
1678 
1679  d = DotProduct (right, forward);
1680  VectorMA (right, -d, forward, right);
1683 }

Referenced by CL_RailTrail().

Variable Documentation

◆ active_particles

◆ avelocities

vec3_t avelocities[NUMVERTEXNORMALS]
static

Definition at line 39 of file cl_fx.c.

Referenced by CL_BfgParticles(), and CL_FlyParticles().

◆ cl_dlights

cdlight_t cl_dlights[MAX_DLIGHTS]

Definition at line 231 of file cl_fx.c.

Referenced by CL_AddDLights(), CL_AllocDlight(), CL_ClearDlights(), and CL_RunDLights().

◆ cl_lightstyle

◆ cl_mod_flash

struct model_s* cl_mod_flash

Definition at line 117 of file cl_tent.c.

◆ cl_mod_smoke

struct model_s* cl_mod_smoke

Definition at line 116 of file cl_tent.c.

◆ cl_numparticles

int cl_numparticles = MAX_PARTICLES

Definition at line 65 of file cl_fx.c.

Referenced by CL_ClearParticles().

◆ cl_sfx_footsteps

struct sfx_s* cl_sfx_footsteps[4]

Definition at line 113 of file cl_tent.c.

Referenced by CL_EntityEvent().

◆ free_particles

◆ lastofs

int lastofs

Definition at line 60 of file cl_fx.c.

Referenced by CL_ClearLightStyles(), and CL_RunLightStyles().

◆ particles

Definition at line 63 of file cl_fx.c.

Referenced by CL_ClearParticles(), and GL_DrawParticles().

MZ2_WIDOW_BLASTER_SWEEP3
#define MZ2_WIDOW_BLASTER_SWEEP3
Definition: q_shared.h:868
MZ2_CARRIER_MACHINEGUN_R1
#define MZ2_CARRIER_MACHINEGUN_R1
Definition: q_shared.h:849
MZ_LOGIN
#define MZ_LOGIN
Definition: q_shared.h:665
MZ2_WIDOW_BLASTER_70L
#define MZ2_WIDOW_BLASTER_70L
Definition: q_shared.h:892
MZ2_MAKRON_BLASTER_16
#define MZ2_MAKRON_BLASTER_16
Definition: q_shared.h:825
MZ2_WIDOW_PLASMABEAM
#define MZ2_WIDOW_PLASMABEAM
Definition: q_shared.h:861
MZ2_CARRIER_MACHINEGUN_L1
#define MZ2_CARRIER_MACHINEGUN_L1
Definition: q_shared.h:848
particle_s::vel
vec3_t vel
Definition: client.h:416
MZ2_WIDOW_BLASTER_SWEEP4
#define MZ2_WIDOW_BLASTER_SWEEP4
Definition: q_shared.h:869
MZ2_BOSS2_MACHINEGUN_R4
#define MZ2_BOSS2_MACHINEGUN_R4
Definition: q_shared.h:844
MZ2_WIDOW_BLASTER_SWEEP1
#define MZ2_WIDOW_BLASTER_SWEEP1
Definition: q_shared.h:866
cdlight_t::decay
float decay
Definition: client.h:341
MZ2_SUPERTANK_ROCKET_2
#define MZ2_SUPERTANK_ROCKET_2
Definition: q_shared.h:774
MZ2_SOLDIER_SHOTGUN_4
#define MZ2_SOLDIER_SHOTGUN_4
Definition: q_shared.h:793
EF_GREENGIB
#define EF_GREENGIB
Definition: q_shared.h:579
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
entity_s::origin
float origin[3]
Definition: ref.h:57
MZ2_BOSS2_ROCKET_1
#define MZ2_BOSS2_ROCKET_1
Definition: q_shared.h:782
MZ2_TANK_MACHINEGUN_10
#define MZ2_TANK_MACHINEGUN_10
Definition: q_shared.h:706
EV_FALL
@ EV_FALL
Definition: q_shared.h:1159
MZ2_WIDOW_RAIL
#define MZ2_WIDOW_RAIL
Definition: q_shared.h:860
MAX_DLIGHTS
#define MAX_DLIGHTS
Definition: ref.h:25
MZ2_JORG_BFG_1
#define MZ2_JORG_BFG_1
Definition: q_shared.h:840
centity_t::fly_stoptime
int fly_stoptime
Definition: client.h:86
MZ_SILENCED
#define MZ_SILENCED
Definition: q_shared.h:676
MZ_IONRIPPER
#define MZ_IONRIPPER
Definition: q_shared.h:673
MZ_GRENADE
#define MZ_GRENADE
Definition: q_shared.h:664
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
MZ2_SOLDIER_MACHINEGUN_3
#define MZ2_SOLDIER_MACHINEGUN_3
Definition: q_shared.h:791
CL_ClearLightStyles
void CL_ClearLightStyles(void)
Definition: cl_fx.c:155
MZ2_TANK_MACHINEGUN_17
#define MZ2_TANK_MACHINEGUN_17
Definition: q_shared.h:713
MZ2_WIDOW_BLASTER_SWEEP7
#define MZ2_WIDOW_BLASTER_SWEEP7
Definition: q_shared.h:872
MZ2_WIDOW2_BEAM_SWEEP_10
#define MZ2_WIDOW2_BEAM_SWEEP_10
Definition: q_shared.h:919
MakeNormalVectors
void MakeNormalVectors(vec3_t forward, vec3_t right, vec3_t up)
Definition: cl_fx.c:1669
cdlight_t::radius
float radius
Definition: client.h:339
MZ2_TANK_ROCKET_3
#define MZ2_TANK_ROCKET_3
Definition: q_shared.h:718
EV_PLAYER_TELEPORT
@ EV_PLAYER_TELEPORT
Definition: q_shared.h:1161
CL_DiminishingTrail
void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
Definition: cl_fx.c:1564
MZ2_TANK_BLASTER_2
#define MZ2_TANK_BLASTER_2
Definition: q_shared.h:695
MZ2_ACTOR_MACHINEGUN_1
#define MZ2_ACTOR_MACHINEGUN_1
Definition: q_shared.h:765
MZ2_TURRET_ROCKET
#define MZ2_TURRET_ROCKET
Definition: q_shared.h:852
MZ2_TANK_MACHINEGUN_8
#define MZ2_TANK_MACHINEGUN_8
Definition: q_shared.h:704
MZ2_WIDOW2_BEAM_SWEEP_6
#define MZ2_WIDOW2_BEAM_SWEEP_6
Definition: q_shared.h:915
clightstyle_t::map
float map[MAX_QPATH]
Definition: cl_fx.c:56
MZ2_BOSS2_MACHINEGUN_R1
#define MZ2_BOSS2_MACHINEGUN_R1
Definition: q_shared.h:841
particle_s::time
float time
Definition: client.h:413
MZ2_INFANTRY_MACHINEGUN_4
#define MZ2_INFANTRY_MACHINEGUN_4
Definition: q_shared.h:723
MZ2_MEDIC_BLASTER_2
#define MZ2_MEDIC_BLASTER_2
Definition: q_shared.h:856
MZ2_JORG_MACHINEGUN_R1
#define MZ2_JORG_MACHINEGUN_R1
Definition: q_shared.h:834
particle_s::accel
vec3_t accel
Definition: client.h:417
CL_AllocDlight
cdlight_t * CL_AllocDlight(int key)
Definition: cl_fx.c:249
MZ2_BOSS2_MACHINEGUN_L4
#define MZ2_BOSS2_MACHINEGUN_L4
Definition: q_shared.h:780
MZ2_GUNNER_MACHINEGUN_1
#define MZ2_GUNNER_MACHINEGUN_1
Definition: q_shared.h:741
MZ2_TANK_MACHINEGUN_15
#define MZ2_TANK_MACHINEGUN_15
Definition: q_shared.h:711
MZ2_SOLDIER_BLASTER_5
#define MZ2_SOLDIER_BLASTER_5
Definition: q_shared.h:795
MSG_ReadShort
int MSG_ReadShort(sizebuf_t *msg_read)
Definition: common.c:735
net_message
sizebuf_t net_message
Definition: net_chan.c:82
frand
float frand(void)
Definition: common.c:1398
v
GLdouble v
Definition: qgl_win.c:143
cdlight_t::die
float die
Definition: client.h:340
MZ2_BOSS2_ROCKET_3
#define MZ2_BOSS2_ROCKET_3
Definition: q_shared.h:784
MZ2_GUNNER_GRENADE_3
#define MZ2_GUNNER_GRENADE_3
Definition: q_shared.h:751
MZ2_TURRET_BLASTER
#define MZ2_TURRET_BLASTER
Definition: q_shared.h:853
MZ2_WIDOW_BLASTER_SWEEP2
#define MZ2_WIDOW_BLASTER_SWEEP2
Definition: q_shared.h:867
lastofs
int lastofs
Definition: cl_fx.c:60
MZ2_WIDOW_BLASTER_80
#define MZ2_WIDOW_BLASTER_80
Definition: q_shared.h:877
MZ_CHAINGUN3
#define MZ_CHAINGUN3
Definition: q_shared.h:661
MZ2_JORG_MACHINEGUN_L4
#define MZ2_JORG_MACHINEGUN_L4
Definition: q_shared.h:831
MZ_NUKE8
#define MZ_NUKE8
Definition: q_shared.h:688
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1173
MZ2_WIDOW2_BEAMER_4
#define MZ2_WIDOW2_BEAMER_4
Definition: q_shared.h:908
model_s::flags
int flags
Definition: r_model.h:180
MZ2_WIDOW_BLASTER
#define MZ2_WIDOW_BLASTER
Definition: q_shared.h:859
MZ_MACHINEGUN
#define MZ_MACHINEGUN
Definition: q_shared.h:657
cdlight_t
Definition: client.h:334
MZ2_WIDOW_BLASTER_30L
#define MZ2_WIDOW_BLASTER_30L
Definition: q_shared.h:888
MZ2_SOLDIER_MACHINEGUN_6
#define MZ2_SOLDIER_MACHINEGUN_6
Definition: q_shared.h:800
MZ_CHAINGUN1
#define MZ_CHAINGUN1
Definition: q_shared.h:659
MZ2_SOLDIER_SHOTGUN_8
#define MZ2_SOLDIER_SHOTGUN_8
Definition: q_shared.h:805
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
x
GLint GLenum GLint x
Definition: qgl_win.c:116
MZ2_SOLDIER_MACHINEGUN_1
#define MZ2_SOLDIER_MACHINEGUN_1
Definition: q_shared.h:738
EV_FOOTSTEP
@ EV_FOOTSTEP
Definition: q_shared.h:1157
MZ2_WIDOW2_BEAM_SWEEP_11
#define MZ2_WIDOW2_BEAM_SWEEP_11
Definition: q_shared.h:920
z
GLdouble GLdouble z
Definition: qgl_win.c:283
MZ_NUKE1
#define MZ_NUKE1
Definition: q_shared.h:685
MZ2_WIDOW2_BEAM_SWEEP_4
#define MZ2_WIDOW2_BEAM_SWEEP_4
Definition: q_shared.h:913
VectorClear
#define VectorClear(a)
Definition: q_shared.h:159
i
int i
Definition: q_shared.c:305
MZ2_TANK_MACHINEGUN_12
#define MZ2_TANK_MACHINEGUN_12
Definition: q_shared.h:708
MZ2_MAKRON_BLASTER_9
#define MZ2_MAKRON_BLASTER_9
Definition: q_shared.h:818
MZ_CHAINGUN2
#define MZ_CHAINGUN2
Definition: q_shared.h:660
MZ2_GUNNER_GRENADE_4
#define MZ2_GUNNER_GRENADE_4
Definition: q_shared.h:752
MZ2_SOLDIER_SHOTGUN_6
#define MZ2_SOLDIER_SHOTGUN_6
Definition: q_shared.h:799
MZ2_INFANTRY_MACHINEGUN_3
#define MZ2_INFANTRY_MACHINEGUN_3
Definition: q_shared.h:722
MZ_HYPERBLASTER
#define MZ_HYPERBLASTER
Definition: q_shared.h:670
fv
float fv
Definition: r_edge.c:75
MZ2_INFANTRY_MACHINEGUN_7
#define MZ2_INFANTRY_MACHINEGUN_7
Definition: q_shared.h:726
MZ2_WIDOW2_BEAM_SWEEP_1
#define MZ2_WIDOW2_BEAM_SWEEP_1
Definition: q_shared.h:910
entity_state_s::event
int event
Definition: q_shared.h:1186
particle_s::org
vec3_t org
Definition: client.h:415
MZ2_WIDOW_RUN_2
#define MZ2_WIDOW_RUN_2
Definition: q_shared.h:894
ATTN_IDLE
#define ATTN_IDLE
Definition: q_shared.h:1020
MZ2_JORG_MACHINEGUN_R6
#define MZ2_JORG_MACHINEGUN_R6
Definition: q_shared.h:839
cdlight_t::key
int key
Definition: client.h:336
MZ2_TANK_ROCKET_1
#define MZ2_TANK_ROCKET_1
Definition: q_shared.h:716
MZ2_WIDOW_BLASTER_SWEEP5
#define MZ2_WIDOW_BLASTER_SWEEP5
Definition: q_shared.h:870
MZ2_SOLDIER_MACHINEGUN_7
#define MZ2_SOLDIER_MACHINEGUN_7
Definition: q_shared.h:803
MZ2_SOLDIER_SHOTGUN_1
#define MZ2_SOLDIER_SHOTGUN_1
Definition: q_shared.h:736
M_PI
#define M_PI
Definition: q_shared.h:135
MZ2_TANK_MACHINEGUN_13
#define MZ2_TANK_MACHINEGUN_13
Definition: q_shared.h:709
MZ2_WIDOW_DISRUPTOR
#define MZ2_WIDOW_DISRUPTOR
Definition: q_shared.h:858
MZ2_INFANTRY_MACHINEGUN_8
#define MZ2_INFANTRY_MACHINEGUN_8
Definition: q_shared.h:727
MZ2_WIDOW_BLASTER_90
#define MZ2_WIDOW_BLASTER_90
Definition: q_shared.h:876
MZ2_WIDOW2_BEAMER_2
#define MZ2_WIDOW2_BEAMER_2
Definition: q_shared.h:906
type
GLenum type
Definition: qgl_win.c:72
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:1019
MZ2_HOVER_BLASTER_1
#define MZ2_HOVER_BLASTER_1
Definition: q_shared.h:763
MZ2_BOSS2_MACHINEGUN_L3
#define MZ2_BOSS2_MACHINEGUN_L3
Definition: q_shared.h:779
CL_ClearParticles
void CL_ClearParticles(void)
Definition: cl_fx.c:991
MZ2_TANK_MACHINEGUN_9
#define MZ2_TANK_MACHINEGUN_9
Definition: q_shared.h:705
MZ2_TANK_MACHINEGUN_14
#define MZ2_TANK_MACHINEGUN_14
Definition: q_shared.h:710
MZ2_WIDOW_RUN_8
#define MZ2_WIDOW_RUN_8
Definition: q_shared.h:900
MZ2_MAKRON_BLASTER_2
#define MZ2_MAKRON_BLASTER_2
Definition: q_shared.h:811
j
GLint j
Definition: qgl_win.c:150
MZ2_INFANTRY_MACHINEGUN_6
#define MZ2_INFANTRY_MACHINEGUN_6
Definition: q_shared.h:725
particle_s::next
struct particle_s * next
Definition: client.h:411
MZ2_SUPERTANK_ROCKET_1
#define MZ2_SUPERTANK_ROCKET_1
Definition: q_shared.h:773
MZ2_MEDIC_BLASTER_1
#define MZ2_MEDIC_BLASTER_1
Definition: q_shared.h:759
MZ_BLUEHYPERBLASTER
#define MZ_BLUEHYPERBLASTER
Definition: q_shared.h:674
clightstyle_t::length
int length
Definition: cl_fx.c:54
avelocities
static vec3_t avelocities[NUMVERTEXNORMALS]
Definition: cl_fx.c:39
MZ2_WIDOW_BLASTER_SWEEP6
#define MZ2_WIDOW_BLASTER_SWEEP6
Definition: q_shared.h:871
MZ2_INFANTRY_MACHINEGUN_2
#define MZ2_INFANTRY_MACHINEGUN_2
Definition: q_shared.h:721
MZ2_MAKRON_BLASTER_7
#define MZ2_MAKRON_BLASTER_7
Definition: q_shared.h:816
MZ_SHOTGUN2
#define MZ_SHOTGUN2
Definition: q_shared.h:681
ATTN_NONE
#define ATTN_NONE
Definition: q_shared.h:1018
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:1007
particle_s::alphavel
float alphavel
Definition: client.h:426
MZ2_WIDOW_BLASTER_20L
#define MZ2_WIDOW_BLASTER_20L
Definition: q_shared.h:887
CL_FlyParticles
void CL_FlyParticles(vec3_t origin, int count)
Definition: cl_fx.c:1962
MZ2_TANK_MACHINEGUN_1
#define MZ2_TANK_MACHINEGUN_1
Definition: q_shared.h:697
MZ2_WIDOW_RUN_1
#define MZ2_WIDOW_RUN_1
Definition: q_shared.h:893
MZ2_INFANTRY_MACHINEGUN_11
#define MZ2_INFANTRY_MACHINEGUN_11
Definition: q_shared.h:730
bytedirs
vec3_t bytedirs[NUMVERTEXNORMALS]
Definition: common.c:300
particle_s
Definition: client.h:409
monster_flash_offset
vec3_t monster_flash_offset[]
Definition: m_flash.c:27
MZ2_JORG_MACHINEGUN_R4
#define MZ2_JORG_MACHINEGUN_R4
Definition: q_shared.h:837
MZ2_WIDOW_BLASTER_40L
#define MZ2_WIDOW_BLASTER_40L
Definition: q_shared.h:889
MZ2_GUNNER_MACHINEGUN_2
#define MZ2_GUNNER_MACHINEGUN_2
Definition: q_shared.h:742
MZ2_SOLDIER_SHOTGUN_3
#define MZ2_SOLDIER_SHOTGUN_3
Definition: q_shared.h:790
CrossProduct
void CrossProduct(vec3_t v1, vec3_t v2, vec3_t cross)
Definition: q_shared.c:753
MZ2_TANK_MACHINEGUN_16
#define MZ2_TANK_MACHINEGUN_16
Definition: q_shared.h:712
MZ2_CARRIER_ROCKET_1
#define MZ2_CARRIER_ROCKET_1
Definition: q_shared.h:901
MZ2_WIDOW_RUN_6
#define MZ2_WIDOW_RUN_6
Definition: q_shared.h:898
MZ2_WIDOW2_BEAM_SWEEP_7
#define MZ2_WIDOW2_BEAM_SWEEP_7
Definition: q_shared.h:916
EF_ROCKET
#define EF_ROCKET
Definition: q_shared.h:561
MZ2_JORG_MACHINEGUN_L2
#define MZ2_JORG_MACHINEGUN_L2
Definition: q_shared.h:829
S_RegisterSound
sfx_t * S_RegisterSound(char *name)
Definition: snd_dma.c:305
VIDREF_GL
#define VIDREF_GL
Definition: q_shared.h:1226
MZ2_INFANTRY_MACHINEGUN_10
#define MZ2_INFANTRY_MACHINEGUN_10
Definition: q_shared.h:729
CL_SmokeAndFlash
void CL_SmokeAndFlash(vec3_t origin)
Definition: cl_tent.c:292
MZ2_CHICK_ROCKET_1
#define MZ2_CHICK_ROCKET_1
Definition: q_shared.h:754
MZ2_GUNNER_MACHINEGUN_6
#define MZ2_GUNNER_MACHINEGUN_6
Definition: q_shared.h:746
MZ2_WIDOW_BLASTER_30
#define MZ2_WIDOW_BLASTER_30
Definition: q_shared.h:882
centity_t
Definition: client.h:75
MZ2_WIDOW2_BEAM_SWEEP_2
#define MZ2_WIDOW2_BEAM_SWEEP_2
Definition: q_shared.h:911
MZ2_TANK_MACHINEGUN_4
#define MZ2_TANK_MACHINEGUN_4
Definition: q_shared.h:700
MZ2_SUPERTANK_ROCKET_3
#define MZ2_SUPERTANK_ROCKET_3
Definition: q_shared.h:775
MZ2_WIDOW_BLASTER_60
#define MZ2_WIDOW_BLASTER_60
Definition: q_shared.h:879
CL_ClearDlights
void CL_ClearDlights(void)
Definition: cl_fx.c:238
starttime
int starttime
Definition: sys_win.c:41
MZ2_INFANTRY_MACHINEGUN_5
#define MZ2_INFANTRY_MACHINEGUN_5
Definition: q_shared.h:724
MZ_SHOTGUN
#define MZ_SHOTGUN
Definition: q_shared.h:658
forward
static vec3_t forward
Definition: p_view.c:29
MZ2_WIDOW_BLASTER_50L
#define MZ2_WIDOW_BLASTER_50L
Definition: q_shared.h:890
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
MZ2_WIDOW2_BEAMER_1
#define MZ2_WIDOW2_BEAMER_1
Definition: q_shared.h:905
cl_footsteps
cvar_t * cl_footsteps
Definition: cl_main.c:44
MZ2_SUPERTANK_MACHINEGUN_2
#define MZ2_SUPERTANK_MACHINEGUN_2
Definition: q_shared.h:768
MZ_LOGOUT
#define MZ_LOGOUT
Definition: q_shared.h:666
MZ2_STALKER_BLASTER
#define MZ2_STALKER_BLASTER
Definition: q_shared.h:854
V_AddParticle
void V_AddParticle(vec3_t org, int color, float alpha)
Definition: cl_view.c:139
MZ2_WIDOW2_BEAMER_3
#define MZ2_WIDOW2_BEAMER_3
Definition: q_shared.h:907
EF_GIB
#define EF_GIB
Definition: q_shared.h:559
MZ2_BOSS2_MACHINEGUN_L1
#define MZ2_BOSS2_MACHINEGUN_L1
Definition: q_shared.h:777
centity_t::trailcount
int trailcount
Definition: client.h:83
CL_TeleportParticles
void CL_TeleportParticles(vec3_t org)
Definition: cl_fx.c:2284
MZ_NUKE4
#define MZ_NUKE4
Definition: q_shared.h:687
BEAMLENGTH
#define BEAMLENGTH
Definition: cl_fx.c:2064
MZ_RAILGUN
#define MZ_RAILGUN
Definition: q_shared.h:662
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:155
MZ2_MAKRON_BLASTER_17
#define MZ2_MAKRON_BLASTER_17
Definition: q_shared.h:826
particle_s::alpha
float alpha
Definition: client.h:425
MZ_NUKE2
#define MZ_NUKE2
Definition: q_shared.h:686
MZ2_MAKRON_BLASTER_15
#define MZ2_MAKRON_BLASTER_15
Definition: q_shared.h:824
MZ2_TANK_MACHINEGUN_6
#define MZ2_TANK_MACHINEGUN_6
Definition: q_shared.h:702
MZ2_MAKRON_BLASTER_13
#define MZ2_MAKRON_BLASTER_13
Definition: q_shared.h:822
cvar_s::value
float value
Definition: q_shared.h:324
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *msg_read)
Definition: common.c:722
cdlight_t::color
vec3_t color
Definition: client.h:337
MZ2_SOLDIER_BLASTER_8
#define MZ2_SOLDIER_BLASTER_8
Definition: q_shared.h:804
MZ2_BOSS2_MACHINEGUN_R2
#define MZ2_BOSS2_MACHINEGUN_R2
Definition: q_shared.h:842
MZ2_WIDOW_BLASTER_SWEEP9
#define MZ2_WIDOW_BLASTER_SWEEP9
Definition: q_shared.h:874
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
entity_state_s::number
int number
Definition: q_shared.h:1171
NULL
#define NULL
Definition: q_shared.h:60
MZ2_GUNNER_MACHINEGUN_3
#define MZ2_GUNNER_MACHINEGUN_3
Definition: q_shared.h:743
MZ2_SOLDIER_SHOTGUN_7
#define MZ2_SOLDIER_SHOTGUN_7
Definition: q_shared.h:802
MZ2_CARRIER_MACHINEGUN_R2
#define MZ2_CARRIER_MACHINEGUN_R2
Definition: q_shared.h:863
MZ2_MAKRON_BLASTER_10
#define MZ2_MAKRON_BLASTER_10
Definition: q_shared.h:819
MZ2_WIDOW_BLASTER_100
#define MZ2_WIDOW_BLASTER_100
Definition: q_shared.h:875
V_AddLightStyle
void V_AddLightStyle(int style, float r, float g, float b)
Definition: cl_view.c:178
MZ2_GUNNER_MACHINEGUN_4
#define MZ2_GUNNER_MACHINEGUN_4
Definition: q_shared.h:744
clightstyle_t
Definition: cl_fx.c:52
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
MZ2_TANK_MACHINEGUN_3
#define MZ2_TANK_MACHINEGUN_3
Definition: q_shared.h:699
MZ2_BOSS2_ROCKET_2
#define MZ2_BOSS2_ROCKET_2
Definition: q_shared.h:783
MZ2_JORG_MACHINEGUN_L6
#define MZ2_JORG_MACHINEGUN_L6
Definition: q_shared.h:833
cl_dlights
cdlight_t cl_dlights[MAX_DLIGHTS]
Definition: cl_fx.c:231
current
static int current
Definition: cl_scrn.c:131
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
clightstyle_t::value
float value[3]
Definition: cl_fx.c:55
client_state_t::time
int time
Definition: client.h:147
MZ2_MAKRON_BLASTER_8
#define MZ2_MAKRON_BLASTER_8
Definition: q_shared.h:817
MZ2_SOLDIER_BLASTER_6
#define MZ2_SOLDIER_BLASTER_6
Definition: q_shared.h:798
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
MZ2_SOLDIER_BLASTER_4
#define MZ2_SOLDIER_BLASTER_4
Definition: q_shared.h:792
MZ2_GUNNER_MACHINEGUN_5
#define MZ2_GUNNER_MACHINEGUN_5
Definition: q_shared.h:745
EV_ITEM_RESPAWN
@ EV_ITEM_RESPAWN
Definition: q_shared.h:1156
MZ_BLASTER2
#define MZ_BLASTER2
Definition: q_shared.h:683
MZ2_CARRIER_RAILGUN
#define MZ2_CARRIER_RAILGUN
Definition: q_shared.h:857
MZ_BFG
#define MZ_BFG
Definition: q_shared.h:668
MZ2_WIDOW_BLASTER_20
#define MZ2_WIDOW_BLASTER_20
Definition: q_shared.h:883
MZ2_WIDOW_BLASTER_40
#define MZ2_WIDOW_BLASTER_40
Definition: q_shared.h:881
MZ2_FLOAT_BLASTER_1
#define MZ2_FLOAT_BLASTER_1
Definition: q_shared.h:787
MZ2_TANK_ROCKET_2
#define MZ2_TANK_ROCKET_2
Definition: q_shared.h:717
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:80
MZ2_SOLDIER_BLASTER_7
#define MZ2_SOLDIER_BLASTER_7
Definition: q_shared.h:801
MZ2_SOLDIER_BLASTER_3
#define MZ2_SOLDIER_BLASTER_3
Definition: q_shared.h:789
MZ2_SOLDIER_BLASTER_1
#define MZ2_SOLDIER_BLASTER_1
Definition: q_shared.h:734
MZ2_MAKRON_BLASTER_14
#define MZ2_MAKRON_BLASTER_14
Definition: q_shared.h:823
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:157
MZ2_GUNNER_MACHINEGUN_7
#define MZ2_GUNNER_MACHINEGUN_7
Definition: q_shared.h:747
model_s::radius
float radius
Definition: gl_model.h:189
MZ_TRACKER
#define MZ_TRACKER
Definition: q_shared.h:684
y
GLint y
Definition: qgl_win.c:115
MZ2_BOSS2_MACHINEGUN_L5
#define MZ2_BOSS2_MACHINEGUN_L5
Definition: q_shared.h:781
MZ2_TANK_BLASTER_3
#define MZ2_TANK_BLASTER_3
Definition: q_shared.h:696
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
INSTANT_PARTICLE
#define INSTANT_PARTICLE
Definition: client.h:456
MZ2_MAKRON_BLASTER_1
#define MZ2_MAKRON_BLASTER_1
Definition: q_shared.h:810
MZ2_WIDOW2_BEAM_SWEEP_8
#define MZ2_WIDOW2_BEAM_SWEEP_8
Definition: q_shared.h:917
MZ2_JORG_MACHINEGUN_R2
#define MZ2_JORG_MACHINEGUN_R2
Definition: q_shared.h:835
MZ2_SOLDIER_MACHINEGUN_8
#define MZ2_SOLDIER_MACHINEGUN_8
Definition: q_shared.h:806
MZ2_WIDOW_BLASTER_SWEEP8
#define MZ2_WIDOW_BLASTER_SWEEP8
Definition: q_shared.h:873
MZ2_WIDOW_RUN_3
#define MZ2_WIDOW_RUN_3
Definition: q_shared.h:895
MZ2_WIDOW_BLASTER_0
#define MZ2_WIDOW_BLASTER_0
Definition: q_shared.h:885
MZ2_WIDOW_BLASTER_10L
#define MZ2_WIDOW_BLASTER_10L
Definition: q_shared.h:886
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
MZ2_MAKRON_BLASTER_5
#define MZ2_MAKRON_BLASTER_5
Definition: q_shared.h:814
particle_s::colorvel
float colorvel
Definition: client.h:423
MZ2_INFANTRY_MACHINEGUN_13
#define MZ2_INFANTRY_MACHINEGUN_13
Definition: q_shared.h:732
MZ2_MAKRON_BLASTER_6
#define MZ2_MAKRON_BLASTER_6
Definition: q_shared.h:815
up
static vec3_t up
Definition: p_view.c:29
MZ2_JORG_MACHINEGUN_L3
#define MZ2_JORG_MACHINEGUN_L3
Definition: q_shared.h:830
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:1008
MZ2_BOSS2_MACHINEGUN_R5
#define MZ2_BOSS2_MACHINEGUN_R5
Definition: q_shared.h:845
MZ_PHALANX
#define MZ_PHALANX
Definition: q_shared.h:675
MZ2_BOSS2_MACHINEGUN_R3
#define MZ2_BOSS2_MACHINEGUN_R3
Definition: q_shared.h:843
MZ2_INFANTRY_MACHINEGUN_1
#define MZ2_INFANTRY_MACHINEGUN_1
Definition: q_shared.h:720
CL_ItemRespawnParticles
void CL_ItemRespawnParticles(vec3_t org)
Definition: cl_fx.c:1239
MZ_ROCKET
#define MZ_ROCKET
Definition: q_shared.h:663
MZ2_TANK_MACHINEGUN_2
#define MZ2_TANK_MACHINEGUN_2
Definition: q_shared.h:698
client_static_t::frametime
float frametime
Definition: client.h:229
MZ2_DAEDALUS_BLASTER
#define MZ2_DAEDALUS_BLASTER
Definition: q_shared.h:855
MZ2_TANK_MACHINEGUN_19
#define MZ2_TANK_MACHINEGUN_19
Definition: q_shared.h:715
cl_sfx_footsteps
struct sfx_s * cl_sfx_footsteps[4]
Definition: cl_tent.c:113
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
MZ2_WIDOW2_BEAMER_5
#define MZ2_WIDOW2_BEAMER_5
Definition: q_shared.h:909
MZ2_SUPERTANK_MACHINEGUN_6
#define MZ2_SUPERTANK_MACHINEGUN_6
Definition: q_shared.h:772
MZ2_BOSS2_MACHINEGUN_L2
#define MZ2_BOSS2_MACHINEGUN_L2
Definition: q_shared.h:778
MZ2_INFANTRY_MACHINEGUN_12
#define MZ2_INFANTRY_MACHINEGUN_12
Definition: q_shared.h:731
EV_FALLSHORT
@ EV_FALLSHORT
Definition: q_shared.h:1158
MZ2_TANK_MACHINEGUN_7
#define MZ2_TANK_MACHINEGUN_7
Definition: q_shared.h:703
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:178
MZ2_GUNNER_GRENADE_2
#define MZ2_GUNNER_GRENADE_2
Definition: q_shared.h:750
cdlight_t::minlight
float minlight
Definition: client.h:342
MZ2_WIDOW_BLASTER_70
#define MZ2_WIDOW_BLASTER_70
Definition: q_shared.h:878
CL_LogoutEffect
void CL_LogoutEffect(vec3_t org, int type)
Definition: cl_fx.c:1192
MZ2_INFANTRY_MACHINEGUN_9
#define MZ2_INFANTRY_MACHINEGUN_9
Definition: q_shared.h:728
MZ2_SOLDIER_BLASTER_2
#define MZ2_SOLDIER_BLASTER_2
Definition: q_shared.h:735
MZ2_WIDOW_RUN_7
#define MZ2_WIDOW_RUN_7
Definition: q_shared.h:899
MZ2_TANK_MACHINEGUN_5
#define MZ2_TANK_MACHINEGUN_5
Definition: q_shared.h:701
EV_FALLFAR
@ EV_FALLFAR
Definition: q_shared.h:1160
MZ2_TANK_MACHINEGUN_11
#define MZ2_TANK_MACHINEGUN_11
Definition: q_shared.h:707
MZ2_WIDOW2_BEAM_SWEEP_3
#define MZ2_WIDOW2_BEAM_SWEEP_3
Definition: q_shared.h:912
MZ2_WIDOW_BLASTER_10
#define MZ2_WIDOW_BLASTER_10
Definition: q_shared.h:884
MZ2_WIDOW_RUN_4
#define MZ2_WIDOW_RUN_4
Definition: q_shared.h:896
active_particles
cparticle_t * active_particles
Definition: cl_fx.c:62
MZ2_WIDOW2_BEAM_SWEEP_9
#define MZ2_WIDOW2_BEAM_SWEEP_9
Definition: q_shared.h:918
cdlight_t::origin
vec3_t origin
Definition: client.h:338
MZ2_TURRET_MACHINEGUN
#define MZ2_TURRET_MACHINEGUN
Definition: q_shared.h:851
MZ2_SUPERTANK_MACHINEGUN_3
#define MZ2_SUPERTANK_MACHINEGUN_3
Definition: q_shared.h:769
right
GLdouble right
Definition: qgl_win.c:159
MZ2_GUNNER_GRENADE_1
#define MZ2_GUNNER_GRENADE_1
Definition: q_shared.h:749
centity_t::current
entity_state_t current
Definition: client.h:78
CS_LIGHTS
#define CS_LIGHTS
Definition: q_shared.h:1139
MZ2_JORG_MACHINEGUN_L1
#define MZ2_JORG_MACHINEGUN_L1
Definition: q_shared.h:828
MZ2_WIDOW_BLASTER_60L
#define MZ2_WIDOW_BLASTER_60L
Definition: q_shared.h:891
particles
cparticle_t particles[MAX_PARTICLES]
Definition: cl_fx.c:63
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:1011
MZ2_WIDOW2_BEAM_SWEEP_5
#define MZ2_WIDOW2_BEAM_SWEEP_5
Definition: q_shared.h:914
cls
client_static_t cls
Definition: cl_main.c:105
NUMVERTEXNORMALS
#define NUMVERTEXNORMALS
Definition: qcommon.h:786
MZ2_CARRIER_MACHINEGUN_L2
#define MZ2_CARRIER_MACHINEGUN_L2
Definition: q_shared.h:862
MZ2_SUPERTANK_MACHINEGUN_5
#define MZ2_SUPERTANK_MACHINEGUN_5
Definition: q_shared.h:771
crand
float crand(void)
Definition: common.c:1403
MZ2_SUPERTANK_MACHINEGUN_1
#define MZ2_SUPERTANK_MACHINEGUN_1
Definition: q_shared.h:767
MZ2_FLYER_BLASTER_1
#define MZ2_FLYER_BLASTER_1
Definition: q_shared.h:756
MZ_RESPAWN
#define MZ_RESPAWN
Definition: q_shared.h:667
MZ2_WIDOW_BLASTER_50
#define MZ2_WIDOW_BLASTER_50
Definition: q_shared.h:880
MZ2_MAKRON_BFG
#define MZ2_MAKRON_BFG
Definition: q_shared.h:809
free_particles
cparticle_t * free_particles
Definition: cl_fx.c:62
MZ2_WIDOW_RUN_5
#define MZ2_WIDOW_RUN_5
Definition: q_shared.h:897
MAX_LIGHTSTYLES
#define MAX_LIGHTSTYLES
Definition: q_shared.h:81
MZ_HEATBEAM
#define MZ_HEATBEAM
Definition: q_shared.h:682
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:108
MZ2_SUPERTANK_MACHINEGUN_4
#define MZ2_SUPERTANK_MACHINEGUN_4
Definition: q_shared.h:770
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1174
MZ2_SOLDIER_MACHINEGUN_4
#define MZ2_SOLDIER_MACHINEGUN_4
Definition: q_shared.h:794
cl
client_state_t cl
Definition: cl_main.c:106
MZ2_SOLDIER_SHOTGUN_2
#define MZ2_SOLDIER_SHOTGUN_2
Definition: q_shared.h:737
cl_lightstyle
clightstyle_t cl_lightstyle[MAX_LIGHTSTYLES]
Definition: cl_fx.c:59
MZ2_TANK_MACHINEGUN_18
#define MZ2_TANK_MACHINEGUN_18
Definition: q_shared.h:714
PARTICLE_GRAVITY
#define PARTICLE_GRAVITY
Definition: client.h:453
MZ2_MAKRON_BLASTER_4
#define MZ2_MAKRON_BLASTER_4
Definition: q_shared.h:813
MZ2_GLADIATOR_RAILGUN_1
#define MZ2_GLADIATOR_RAILGUN_1
Definition: q_shared.h:761
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
MZ2_JORG_MACHINEGUN_R5
#define MZ2_JORG_MACHINEGUN_R5
Definition: q_shared.h:838
MZ2_JORG_MACHINEGUN_L5
#define MZ2_JORG_MACHINEGUN_L5
Definition: q_shared.h:832
vidref_val
int vidref_val
Definition: cl_ents.c:28
MZ2_TANK_BLASTER_1
#define MZ2_TANK_BLASTER_1
Definition: q_shared.h:694
CL_ParticleEffect
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1011
MZ2_SOLDIER_SHOTGUN_5
#define MZ2_SOLDIER_SHOTGUN_5
Definition: q_shared.h:796
MZ_ETF_RIFLE
#define MZ_ETF_RIFLE
Definition: q_shared.h:679
cl_numparticles
int cl_numparticles
Definition: cl_fx.c:65
MZ2_JORG_MACHINEGUN_R3
#define MZ2_JORG_MACHINEGUN_R3
Definition: q_shared.h:836
particle_s::color
float color
Definition: client.h:422
MZ2_MAKRON_BLASTER_3
#define MZ2_MAKRON_BLASTER_3
Definition: q_shared.h:812
MZ2_SOLDIER_MACHINEGUN_2
#define MZ2_SOLDIER_MACHINEGUN_2
Definition: q_shared.h:739
MZ2_BOSS2_ROCKET_4
#define MZ2_BOSS2_ROCKET_4
Definition: q_shared.h:785
MZ2_GUNNER_MACHINEGUN_8
#define MZ2_GUNNER_MACHINEGUN_8
Definition: q_shared.h:748
MZ_SSHOTGUN
#define MZ_SSHOTGUN
Definition: q_shared.h:669
count
GLint GLsizei count
Definition: qgl_win.c:128
MZ2_MAKRON_BLASTER_11
#define MZ2_MAKRON_BLASTER_11
Definition: q_shared.h:820
S_StartSound
void S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx, float fvol, float attenuation, float timeofs)
Definition: snd_dma.c:655
MZ2_FLYER_BLASTER_2
#define MZ2_FLYER_BLASTER_2
Definition: q_shared.h:757
V_AddLight
void V_AddLight(vec3_t org, float intensity, float r, float g, float b)
Definition: cl_view.c:157
MZ2_MAKRON_BLASTER_12
#define MZ2_MAKRON_BLASTER_12
Definition: q_shared.h:821
MZ2_SOLDIER_MACHINEGUN_5
#define MZ2_SOLDIER_MACHINEGUN_5
Definition: q_shared.h:797
MZ_BLASTER
#define MZ_BLASTER
Definition: q_shared.h:656