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

Go to the source code of this file.

Classes

struct  explosion_t
 
struct  beam_t
 
struct  laser_t
 

Macros

#define MAX_EXPLOSIONS   32
 
#define MAX_BEAMS   32
 
#define MAX_LASERS   32
 
#define EXPLOSION_PARTICLES(x)   CL_ExplosionParticles((x));
 

Enumerations

enum  exptype_t {
  ex_free, ex_explosion, ex_misc, ex_flash,
  ex_mflash, ex_poly, ex_poly2
}
 

Functions

void CL_TeleportParticles (vec3_t org)
 
void CL_BlasterParticles (vec3_t org, vec3_t dir)
 
void CL_BFGExplosionParticles (vec3_t org)
 
void CL_BlueBlasterParticles (vec3_t org, vec3_t dir)
 
void CL_ExplosionParticles (vec3_t org)
 
void CL_Explosion_Particle (vec3_t org, float size, qboolean large, qboolean rocket)
 
void CL_RegisterTEntSounds (void)
 
void CL_RegisterTEntModels (void)
 
void CL_ClearTEnts (void)
 
explosion_tCL_AllocExplosion (void)
 
void CL_SmokeAndFlash (vec3_t origin)
 
void CL_ParseParticles (void)
 
int CL_ParseBeam (struct model_s *model)
 
int CL_ParseBeam2 (struct model_s *model)
 
int CL_ParsePlayerBeam (struct model_s *model)
 
int CL_ParseLightning (struct model_s *model)
 
void CL_ParseLaser (int colors)
 
void CL_ParseSteam (void)
 
void CL_ParseWidow (void)
 
void CL_ParseNuke (void)
 
void CL_ParseTEnt (void)
 
void CL_AddBeams (void)
 
void CL_AddPlayerBeams (void)
 
void CL_AddExplosions (void)
 
void CL_AddLasers (void)
 
void CL_ProcessSustain ()
 
void CL_AddTEnts (void)
 

Variables

explosion_t cl_explosions [MAX_EXPLOSIONS]
 
beam_t cl_beams [MAX_BEAMS]
 
beam_t cl_playerbeams [MAX_BEAMS]
 
laser_t cl_lasers [MAX_LASERS]
 
cl_sustain_t cl_sustains [MAX_SUSTAINS]
 
struct sfx_scl_sfx_ric1
 
struct sfx_scl_sfx_ric2
 
struct sfx_scl_sfx_ric3
 
struct sfx_scl_sfx_lashit
 
struct sfx_scl_sfx_spark5
 
struct sfx_scl_sfx_spark6
 
struct sfx_scl_sfx_spark7
 
struct sfx_scl_sfx_railg
 
struct sfx_scl_sfx_rockexp
 
struct sfx_scl_sfx_grenexp
 
struct sfx_scl_sfx_watrexp
 
struct sfx_scl_sfx_plasexp
 
struct sfx_scl_sfx_footsteps [4]
 
struct model_scl_mod_explode
 
struct model_scl_mod_smoke
 
struct model_scl_mod_flash
 
struct model_scl_mod_parasite_segment
 
struct model_scl_mod_grapple_cable
 
struct model_scl_mod_parasite_tip
 
struct model_scl_mod_explo4
 
struct model_scl_mod_bfg_explo
 
struct model_scl_mod_powerscreen
 
struct model_scl_mod_plasmaexplo
 
struct sfx_scl_sfx_lightning
 
struct sfx_scl_sfx_disrexp
 
struct model_scl_mod_lightning
 
struct model_scl_mod_heatbeam
 
struct model_scl_mod_monster_heatbeam
 
struct model_scl_mod_explo4_big
 
static byte splash_color [] = {0x00, 0xe0, 0xb0, 0x50, 0xd0, 0xe0, 0xe8}
 
cvar_thand
 

Macro Definition Documentation

◆ EXPLOSION_PARTICLES

#define EXPLOSION_PARTICLES (   x)    CL_ExplosionParticles((x));

Definition at line 97 of file cl_tent.c.

◆ MAX_BEAMS

#define MAX_BEAMS   32

Definition at line 47 of file cl_tent.c.

◆ MAX_EXPLOSIONS

#define MAX_EXPLOSIONS   32

Definition at line 43 of file cl_tent.c.

◆ MAX_LASERS

#define MAX_LASERS   32

Definition at line 62 of file cl_tent.c.

Enumeration Type Documentation

◆ exptype_t

enum exptype_t
Enumerator
ex_free 
ex_explosion 
ex_misc 
ex_flash 
ex_mflash 
ex_poly 
ex_poly2 

Definition at line 24 of file cl_tent.c.

Function Documentation

◆ CL_AddBeams()

void CL_AddBeams ( void  )

Definition at line 1494 of file cl_tent.c.

1495 {
1496  int i,j;
1497  beam_t *b;
1498  vec3_t dist, org;
1499  float d;
1500  entity_t ent;
1501  float yaw, pitch;
1502  float forward;
1503  float len, steps;
1504  float model_length;
1505 
1506 // update beams
1507  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
1508  {
1509  if (!b->model || b->endtime < cl.time)
1510  continue;
1511 
1512  // if coming from the player, update the start position
1513  if (b->entity == cl.playernum+1) // entity 0 is the world
1514  {
1516  b->start[2] -= 22; // adjust for view height
1517  }
1518  VectorAdd (b->start, b->offset, org);
1519 
1520  // calculate pitch and yaw
1521  VectorSubtract (b->end, org, dist);
1522 
1523  if (dist[1] == 0 && dist[0] == 0)
1524  {
1525  yaw = 0;
1526  if (dist[2] > 0)
1527  pitch = 90;
1528  else
1529  pitch = 270;
1530  }
1531  else
1532  {
1533  // PMM - fixed to correct for pitch of 0
1534  if (dist[0])
1535  yaw = (atan2(dist[1], dist[0]) * 180 / M_PI);
1536  else if (dist[1] > 0)
1537  yaw = 90;
1538  else
1539  yaw = 270;
1540  if (yaw < 0)
1541  yaw += 360;
1542 
1543  forward = sqrt (dist[0]*dist[0] + dist[1]*dist[1]);
1544  pitch = (atan2(dist[2], forward) * -180.0 / M_PI);
1545  if (pitch < 0)
1546  pitch += 360.0;
1547  }
1548 
1549  // add new entities for the beams
1550  d = VectorNormalize(dist);
1551 
1552  memset (&ent, 0, sizeof(ent));
1553  if (b->model == cl_mod_lightning)
1554  {
1555  model_length = 35.0;
1556  d-= 20.0; // correction so it doesn't end in middle of tesla
1557  }
1558  else
1559  {
1560  model_length = 30.0;
1561  }
1562  steps = ceil(d/model_length);
1563  len = (d-model_length)/(steps-1);
1564 
1565  // PMM - special case for lightning model .. if the real length is shorter than the model,
1566  // flip it around & draw it from the end to the start. This prevents the model from going
1567  // through the tesla mine (instead it goes through the target)
1568  if ((b->model == cl_mod_lightning) && (d <= model_length))
1569  {
1570 // Com_Printf ("special case\n");
1571  VectorCopy (b->end, ent.origin);
1572  // offset to push beam outside of tesla model (negative because dist is from end to start
1573  // for this beam)
1574 // for (j=0 ; j<3 ; j++)
1575 // ent.origin[j] -= dist[j]*10.0;
1576  ent.model = b->model;
1577  ent.flags = RF_FULLBRIGHT;
1578  ent.angles[0] = pitch;
1579  ent.angles[1] = yaw;
1580  ent.angles[2] = rand()%360;
1581  V_AddEntity (&ent);
1582  return;
1583  }
1584  while (d > 0)
1585  {
1586  VectorCopy (org, ent.origin);
1587  ent.model = b->model;
1588  if (b->model == cl_mod_lightning)
1589  {
1590  ent.flags = RF_FULLBRIGHT;
1591  ent.angles[0] = -pitch;
1592  ent.angles[1] = yaw + 180.0;
1593  ent.angles[2] = rand()%360;
1594  }
1595  else
1596  {
1597  ent.angles[0] = pitch;
1598  ent.angles[1] = yaw;
1599  ent.angles[2] = rand()%360;
1600  }
1601 
1602 // Com_Printf("B: %d -> %d\n", b->entity, b->dest_entity);
1603  V_AddEntity (&ent);
1604 
1605  for (j=0 ; j<3 ; j++)
1606  org[j] += dist[j]*len;
1607  d -= model_length;
1608  }
1609  }
1610 }

Referenced by CL_AddTEnts().

◆ CL_AddExplosions()

void CL_AddExplosions ( void  )

Definition at line 1886 of file cl_tent.c.

1887 {
1888  entity_t *ent;
1889  int i;
1890  explosion_t *ex;
1891  float frac;
1892  int f;
1893 
1894  memset (&ent, 0, sizeof(ent));
1895 
1896  for (i=0, ex=cl_explosions ; i< MAX_EXPLOSIONS ; i++, ex++)
1897  {
1898  if (ex->type == ex_free)
1899  continue;
1900  frac = (cl.time - ex->start)/100.0;
1901  f = floor(frac);
1902 
1903  ent = &ex->ent;
1904 
1905  switch (ex->type)
1906  {
1907  case ex_mflash:
1908  if (f >= ex->frames-1)
1909  ex->type = ex_free;
1910  break;
1911  case ex_misc:
1912  if (f >= ex->frames-1)
1913  {
1914  ex->type = ex_free;
1915  break;
1916  }
1917  ent->alpha = 1.0 - frac/(ex->frames-1);
1918  break;
1919  case ex_flash:
1920  if (f >= 1)
1921  {
1922  ex->type = ex_free;
1923  break;
1924  }
1925  ent->alpha = 1.0;
1926  break;
1927  case ex_poly:
1928  if (f >= ex->frames-1)
1929  {
1930  ex->type = ex_free;
1931  break;
1932  }
1933 
1934  ent->alpha = (16.0 - (float)f)/16.0;
1935 
1936  if (f < 10)
1937  {
1938  ent->skinnum = (f>>1);
1939  if (ent->skinnum < 0)
1940  ent->skinnum = 0;
1941  }
1942  else
1943  {
1944  ent->flags |= RF_TRANSLUCENT;
1945  if (f < 13)
1946  ent->skinnum = 5;
1947  else
1948  ent->skinnum = 6;
1949  }
1950  break;
1951  case ex_poly2:
1952  if (f >= ex->frames-1)
1953  {
1954  ex->type = ex_free;
1955  break;
1956  }
1957 
1958  ent->alpha = (5.0 - (float)f)/5.0;
1959  ent->skinnum = 0;
1960  ent->flags |= RF_TRANSLUCENT;
1961  break;
1962  default:
1963  break;
1964  }
1965 
1966  if (ex->type == ex_free)
1967  continue;
1968  if (ex->light)
1969  {
1970  V_AddLight (ent->origin, ex->light*ent->alpha,
1971  ex->lightcolor[0], ex->lightcolor[1], ex->lightcolor[2]);
1972  }
1973 
1974  VectorCopy (ent->origin, ent->oldorigin);
1975 
1976  if (f < 0)
1977  f = 0;
1978  ent->frame = ex->baseframe + f + 1;
1979  ent->oldframe = ex->baseframe + f;
1980  ent->backlerp = 1.0 - cl.lerpfrac;
1981 
1982  V_AddEntity (ent);
1983  }
1984 }

Referenced by CL_AddTEnts().

◆ CL_AddLasers()

void CL_AddLasers ( void  )

Definition at line 1992 of file cl_tent.c.

1993 {
1994  laser_t *l;
1995  int i;
1996 
1997  for (i=0, l=cl_lasers ; i< MAX_LASERS ; i++, l++)
1998  {
1999  if (l->endtime >= cl.time)
2000  V_AddEntity (&l->ent);
2001  }
2002 }

Referenced by CL_AddTEnts().

◆ CL_AddPlayerBeams()

void CL_AddPlayerBeams ( void  )

Definition at line 1634 of file cl_tent.c.

1635 {
1636  int i,j;
1637  beam_t *b;
1638  vec3_t dist, org;
1639  float d;
1640  entity_t ent;
1641  float yaw, pitch;
1642  float forward;
1643  float len, steps;
1644  int framenum;
1645  float model_length;
1646 
1647  float hand_multiplier;
1648  frame_t *oldframe;
1649  player_state_t *ps, *ops;
1650 
1651  framenum = 0;
1652 
1653 //PMM
1654  if (hand)
1655  {
1656  if (hand->value == 2)
1657  hand_multiplier = 0;
1658  else if (hand->value == 1)
1659  hand_multiplier = -1;
1660  else
1661  hand_multiplier = 1;
1662  }
1663  else
1664  {
1665  hand_multiplier = 1;
1666  }
1667 //PMM
1668 
1669 // update beams
1670  for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
1671  {
1672  vec3_t f,r,u;
1673  if (!b->model || b->endtime < cl.time)
1674  continue;
1675 
1676  if(cl_mod_heatbeam && (b->model == cl_mod_heatbeam))
1677  {
1678 
1679  // if coming from the player, update the start position
1680  if (b->entity == cl.playernum+1) // entity 0 is the world
1681  {
1682  // set up gun position
1683  // code straight out of CL_AddViewWeapon
1684  ps = &cl.frame.playerstate;
1685  j = (cl.frame.serverframe - 1) & UPDATE_MASK;
1686  oldframe = &cl.frames[j];
1687  if (oldframe->serverframe != cl.frame.serverframe-1 || !oldframe->valid)
1688  oldframe = &cl.frame; // previous frame was dropped or involid
1689  ops = &oldframe->playerstate;
1690  for (j=0 ; j<3 ; j++)
1691  {
1692  b->start[j] = cl.refdef.vieworg[j] + ops->gunoffset[j]
1693  + cl.lerpfrac * (ps->gunoffset[j] - ops->gunoffset[j]);
1694  }
1695  VectorMA (b->start, (hand_multiplier * b->offset[0]), cl.v_right, org);
1696  VectorMA ( org, b->offset[1], cl.v_forward, org);
1697  VectorMA ( org, b->offset[2], cl.v_up, org);
1698  if ((hand) && (hand->value == 2)) {
1699  VectorMA (org, -1, cl.v_up, org);
1700  }
1701  // FIXME - take these out when final
1702  VectorCopy (cl.v_right, r);
1703  VectorCopy (cl.v_forward, f);
1704  VectorCopy (cl.v_up, u);
1705 
1706  }
1707  else
1708  VectorCopy (b->start, org);
1709  }
1710  else
1711  {
1712  // if coming from the player, update the start position
1713  if (b->entity == cl.playernum+1) // entity 0 is the world
1714  {
1716  b->start[2] -= 22; // adjust for view height
1717  }
1718  VectorAdd (b->start, b->offset, org);
1719  }
1720 
1721  // calculate pitch and yaw
1722  VectorSubtract (b->end, org, dist);
1723 
1724 //PMM
1725  if(cl_mod_heatbeam && (b->model == cl_mod_heatbeam) && (b->entity == cl.playernum+1))
1726  {
1727  vec_t len;
1728 
1729  len = VectorLength (dist);
1730  VectorScale (f, len, dist);
1731  VectorMA (dist, (hand_multiplier * b->offset[0]), r, dist);
1732  VectorMA (dist, b->offset[1], f, dist);
1733  VectorMA (dist, b->offset[2], u, dist);
1734  if ((hand) && (hand->value == 2)) {
1735  VectorMA (org, -1, cl.v_up, org);
1736  }
1737  }
1738 //PMM
1739 
1740  if (dist[1] == 0 && dist[0] == 0)
1741  {
1742  yaw = 0;
1743  if (dist[2] > 0)
1744  pitch = 90;
1745  else
1746  pitch = 270;
1747  }
1748  else
1749  {
1750  // PMM - fixed to correct for pitch of 0
1751  if (dist[0])
1752  yaw = (atan2(dist[1], dist[0]) * 180 / M_PI);
1753  else if (dist[1] > 0)
1754  yaw = 90;
1755  else
1756  yaw = 270;
1757  if (yaw < 0)
1758  yaw += 360;
1759 
1760  forward = sqrt (dist[0]*dist[0] + dist[1]*dist[1]);
1761  pitch = (atan2(dist[2], forward) * -180.0 / M_PI);
1762  if (pitch < 0)
1763  pitch += 360.0;
1764  }
1765 
1766  if (cl_mod_heatbeam && (b->model == cl_mod_heatbeam))
1767  {
1768  if (b->entity != cl.playernum+1)
1769  {
1770  framenum = 2;
1771 // Com_Printf ("Third person\n");
1772  ent.angles[0] = -pitch;
1773  ent.angles[1] = yaw + 180.0;
1774  ent.angles[2] = 0;
1775 // Com_Printf ("%f %f - %f %f %f\n", -pitch, yaw+180.0, b->offset[0], b->offset[1], b->offset[2]);
1776  AngleVectors(ent.angles, f, r, u);
1777 
1778  // if it's a non-origin offset, it's a player, so use the hardcoded player offset
1779  if (!VectorCompare (b->offset, vec3_origin))
1780  {
1781  VectorMA (org, -(b->offset[0])+1, r, org);
1782  VectorMA (org, -(b->offset[1]), f, org);
1783  VectorMA (org, -(b->offset[2])-10, u, org);
1784  }
1785  else
1786  {
1787  // if it's a monster, do the particle effect
1789  }
1790  }
1791  else
1792  {
1793  framenum = 1;
1794  }
1795  }
1796 
1797  // if it's the heatbeam, draw the particle effect
1798  if ((cl_mod_heatbeam && (b->model == cl_mod_heatbeam) && (b->entity == cl.playernum+1)))
1799  {
1800  CL_Heatbeam (org, dist);
1801  }
1802 
1803  // add new entities for the beams
1804  d = VectorNormalize(dist);
1805 
1806  memset (&ent, 0, sizeof(ent));
1807  if (b->model == cl_mod_heatbeam)
1808  {
1809  model_length = 32.0;
1810  }
1811  else if (b->model == cl_mod_lightning)
1812  {
1813  model_length = 35.0;
1814  d-= 20.0; // correction so it doesn't end in middle of tesla
1815  }
1816  else
1817  {
1818  model_length = 30.0;
1819  }
1820  steps = ceil(d/model_length);
1821  len = (d-model_length)/(steps-1);
1822 
1823  // PMM - special case for lightning model .. if the real length is shorter than the model,
1824  // flip it around & draw it from the end to the start. This prevents the model from going
1825  // through the tesla mine (instead it goes through the target)
1826  if ((b->model == cl_mod_lightning) && (d <= model_length))
1827  {
1828 // Com_Printf ("special case\n");
1829  VectorCopy (b->end, ent.origin);
1830  // offset to push beam outside of tesla model (negative because dist is from end to start
1831  // for this beam)
1832 // for (j=0 ; j<3 ; j++)
1833 // ent.origin[j] -= dist[j]*10.0;
1834  ent.model = b->model;
1835  ent.flags = RF_FULLBRIGHT;
1836  ent.angles[0] = pitch;
1837  ent.angles[1] = yaw;
1838  ent.angles[2] = rand()%360;
1839  V_AddEntity (&ent);
1840  return;
1841  }
1842  while (d > 0)
1843  {
1844  VectorCopy (org, ent.origin);
1845  ent.model = b->model;
1846  if(cl_mod_heatbeam && (b->model == cl_mod_heatbeam))
1847  {
1848 // ent.flags = RF_FULLBRIGHT|RF_TRANSLUCENT;
1849 // ent.alpha = 0.3;
1850  ent.flags = RF_FULLBRIGHT;
1851  ent.angles[0] = -pitch;
1852  ent.angles[1] = yaw + 180.0;
1853  ent.angles[2] = (cl.time) % 360;
1854 // ent.angles[2] = rand()%360;
1855  ent.frame = framenum;
1856  }
1857  else if (b->model == cl_mod_lightning)
1858  {
1859  ent.flags = RF_FULLBRIGHT;
1860  ent.angles[0] = -pitch;
1861  ent.angles[1] = yaw + 180.0;
1862  ent.angles[2] = rand()%360;
1863  }
1864  else
1865  {
1866  ent.angles[0] = pitch;
1867  ent.angles[1] = yaw;
1868  ent.angles[2] = rand()%360;
1869  }
1870 
1871 // Com_Printf("B: %d -> %d\n", b->entity, b->dest_entity);
1872  V_AddEntity (&ent);
1873 
1874  for (j=0 ; j<3 ; j++)
1875  org[j] += dist[j]*len;
1876  d -= model_length;
1877  }
1878  }
1879 }

Referenced by CL_AddTEnts().

◆ CL_AddTEnts()

void CL_AddTEnts ( void  )

Definition at line 2029 of file cl_tent.c.

2030 {
2031  CL_AddBeams ();
2032  // PMM - draw plasma beams
2033  CL_AddPlayerBeams ();
2034  CL_AddExplosions ();
2035  CL_AddLasers ();
2036  // PMM - set up sustain
2038 }

Referenced by CL_AddEntities().

◆ CL_AllocExplosion()

explosion_t* CL_AllocExplosion ( void  )

Definition at line 259 of file cl_tent.c.

260 {
261  int i;
262  int time;
263  int index;
264 
265  for (i=0 ; i<MAX_EXPLOSIONS ; i++)
266  {
267  if (cl_explosions[i].type == ex_free)
268  {
269  memset (&cl_explosions[i], 0, sizeof (cl_explosions[i]));
270  return &cl_explosions[i];
271  }
272  }
273 // find the oldest explosion
274  time = cl.time;
275  index = 0;
276 
277  for (i=0 ; i<MAX_EXPLOSIONS ; i++)
278  if (cl_explosions[i].start < time)
279  {
280  time = cl_explosions[i].start;
281  index = i;
282  }
283  memset (&cl_explosions[index], 0, sizeof (cl_explosions[index]));
284  return &cl_explosions[index];
285 }

Referenced by CL_ParseTEnt(), and CL_SmokeAndFlash().

◆ 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 }

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_BlueBlasterParticles()

void CL_BlueBlasterParticles ( vec3_t  org,
vec3_t  dir 
)

◆ CL_ClearTEnts()

void CL_ClearTEnts ( void  )

Definition at line 229 of file cl_tent.c.

230 {
231  memset (cl_beams, 0, sizeof(cl_beams));
232  memset (cl_explosions, 0, sizeof(cl_explosions));
233  memset (cl_lasers, 0, sizeof(cl_lasers));
234 
235 //ROGUE
236  memset (cl_playerbeams, 0, sizeof(cl_playerbeams));
237  memset (cl_sustains, 0, sizeof(cl_sustains));
238 //ROGUE
239 }

Referenced by CL_ClearState().

◆ CL_Explosion_Particle()

void CL_Explosion_Particle ( vec3_t  org,
float  size,
qboolean  large,
qboolean  rocket 
)

Definition at line 1648 of file cl_fxmax.c.

1649 {
1650  cparticle_t *p;
1651 
1652  if (large)
1653  {
1654  if (size)
1655  {
1657  }
1658  else
1659  {
1660  if (rocket)
1662  else
1664  }
1665 
1666  p = setupParticle (
1667  0, 0, 0,
1668  org[0], org[1], org[2],
1669  0, 0, 0,
1670  0, 0, 0,
1671  255, 255, 255,
1672  0, 0, 0,
1673  1, (0.5+random()*0.5) * (rocket)? -2 : -1.5,
1674  (size!=0)?size:(150-(!rocket)?75:0), 0,
1675  particle_rexplosion1, //whatever :p
1676  PART_DEPTHHACK_SHORT,
1677  pExplosionThink, true);
1678 
1679  if (p)
1680  { //smooth color blend :D
1681  float lightsize = (large)? 1.0 : 0.75;
1682 
1683  addParticleLight (p,
1684  lightsize*250, 0,
1685  1, 1, 1);
1686  addParticleLight (p,
1687  lightsize*265, 0,
1688  1, 0.75, 0);
1689  addParticleLight (p,
1690  lightsize*285, 0,
1691  1, 0.25, 0);
1692  addParticleLight (p,
1693  lightsize*300, 0,
1694  1, 0, 0);
1695  }
1696  }
1697 /* else //volumizers
1698  {
1699  setupParticle (
1700  0, 0, 0,
1701  org[0], org[1], org[2],
1702  0, 0, 0,
1703  0, 0, 0,
1704  255, 175, 100,
1705  0, 0, 0,
1706  1, 1 * (rocket)? -1.5 : -1.25,
1707  (size!=0)?size:(150-(!rocket)?75:0), 0,
1708  particle_inferno,
1709  0,
1710  NULL,0);
1711  }
1712  */
1713 }

Referenced by CL_ParseTEnt().

◆ 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 }

Referenced by CL_ParseTEnt().

◆ CL_ParseBeam()

int CL_ParseBeam ( struct model_s model)

Definition at line 338 of file cl_tent.c.

339 {
340  int ent;
341  vec3_t start, end;
342  beam_t *b;
343  int i;
344 
345  ent = MSG_ReadShort (&net_message);
346 
347  MSG_ReadPos (&net_message, start);
348  MSG_ReadPos (&net_message, end);
349 
350 // override any beam with the same entity
351  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
352  if (b->entity == ent)
353  {
354  b->entity = ent;
355  b->model = model;
356  b->endtime = cl.time + 200;
357  VectorCopy (start, b->start);
358  VectorCopy (end, b->end);
359  VectorClear (b->offset);
360  return ent;
361  }
362 
363 // find a free beam
364  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
365  {
366  if (!b->model || b->endtime < cl.time)
367  {
368  b->entity = ent;
369  b->model = model;
370  b->endtime = cl.time + 200;
371  VectorCopy (start, b->start);
372  VectorCopy (end, b->end);
373  VectorClear (b->offset);
374  return ent;
375  }
376  }
377  Com_Printf ("beam list overflow!\n");
378  return ent;
379 }

Referenced by CL_ParseTEnt().

◆ CL_ParseBeam2()

int CL_ParseBeam2 ( struct model_s model)

Definition at line 386 of file cl_tent.c.

387 {
388  int ent;
389  vec3_t start, end, offset;
390  beam_t *b;
391  int i;
392 
393  ent = MSG_ReadShort (&net_message);
394 
395  MSG_ReadPos (&net_message, start);
396  MSG_ReadPos (&net_message, end);
397  MSG_ReadPos (&net_message, offset);
398 
399 // Com_Printf ("end- %f %f %f\n", end[0], end[1], end[2]);
400 
401 // override any beam with the same entity
402 
403  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
404  if (b->entity == ent)
405  {
406  b->entity = ent;
407  b->model = model;
408  b->endtime = cl.time + 200;
409  VectorCopy (start, b->start);
410  VectorCopy (end, b->end);
411  VectorCopy (offset, b->offset);
412  return ent;
413  }
414 
415 // find a free beam
416  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
417  {
418  if (!b->model || b->endtime < cl.time)
419  {
420  b->entity = ent;
421  b->model = model;
422  b->endtime = cl.time + 200;
423  VectorCopy (start, b->start);
424  VectorCopy (end, b->end);
425  VectorCopy (offset, b->offset);
426  return ent;
427  }
428  }
429  Com_Printf ("beam list overflow!\n");
430  return ent;
431 }

Referenced by CL_ParseTEnt().

◆ CL_ParseLaser()

void CL_ParseLaser ( int  colors)

Definition at line 557 of file cl_tent.c.

558 {
559  vec3_t start;
560  vec3_t end;
561  laser_t *l;
562  int i;
563 
564  MSG_ReadPos (&net_message, start);
565  MSG_ReadPos (&net_message, end);
566 
567  for (i=0, l=cl_lasers ; i< MAX_LASERS ; i++, l++)
568  {
569  if (l->endtime < cl.time)
570  {
572  VectorCopy (start, l->ent.origin);
573  VectorCopy (end, l->ent.oldorigin);
574  l->ent.alpha = 0.30;
575  l->ent.skinnum = (colors >> ((rand() % 4)*8)) & 0xff;
576  l->ent.model = NULL;
577  l->ent.frame = 4;
578  l->endtime = cl.time + 100;
579  return;
580  }
581  }
582 }

Referenced by CL_ParseTEnt().

◆ CL_ParseLightning()

int CL_ParseLightning ( struct model_s model)

Definition at line 504 of file cl_tent.c.

505 {
506  int srcEnt, destEnt;
507  vec3_t start, end;
508  beam_t *b;
509  int i;
510 
511  srcEnt = MSG_ReadShort (&net_message);
512  destEnt = MSG_ReadShort (&net_message);
513 
514  MSG_ReadPos (&net_message, start);
515  MSG_ReadPos (&net_message, end);
516 
517 // override any beam with the same source AND destination entities
518  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
519  if (b->entity == srcEnt && b->dest_entity == destEnt)
520  {
521 // Com_Printf("%d: OVERRIDE %d -> %d\n", cl.time, srcEnt, destEnt);
522  b->entity = srcEnt;
523  b->dest_entity = destEnt;
524  b->model = model;
525  b->endtime = cl.time + 200;
526  VectorCopy (start, b->start);
527  VectorCopy (end, b->end);
528  VectorClear (b->offset);
529  return srcEnt;
530  }
531 
532 // find a free beam
533  for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
534  {
535  if (!b->model || b->endtime < cl.time)
536  {
537 // Com_Printf("%d: NORMAL %d -> %d\n", cl.time, srcEnt, destEnt);
538  b->entity = srcEnt;
539  b->dest_entity = destEnt;
540  b->model = model;
541  b->endtime = cl.time + 200;
542  VectorCopy (start, b->start);
543  VectorCopy (end, b->end);
544  VectorClear (b->offset);
545  return srcEnt;
546  }
547  }
548  Com_Printf ("beam list overflow!\n");
549  return srcEnt;
550 }

Referenced by CL_ParseTEnt().

◆ CL_ParseNuke()

void CL_ParseNuke ( void  )

Definition at line 698 of file cl_tent.c.

699 {
700  vec3_t pos;
701  int i;
702  cl_sustain_t *s, *free_sustain;
703 
704  free_sustain = NULL;
705  for (i=0, s=cl_sustains; i<MAX_SUSTAINS; i++, s++)
706  {
707  if (s->id == 0)
708  {
709  free_sustain = s;
710  break;
711  }
712  }
713  if (free_sustain)
714  {
715  s->id = 21000;
716  MSG_ReadPos (&net_message, s->org);
717  s->endtime = cl.time + 1000;
718  s->think = CL_Nukeblast;
719  s->thinkinterval = 1;
720  s->nextthink = cl.time;
721  }
722  else // no free sustains
723  {
724  // FIXME - read the stuff anyway
725  MSG_ReadPos (&net_message, pos);
726  }
727 }

Referenced by CL_ParseTEnt().

◆ CL_ParseParticles()

void CL_ParseParticles ( void  )

Definition at line 318 of file cl_tent.c.

319 {
320  int color, count;
321  vec3_t pos, dir;
322 
323  MSG_ReadPos (&net_message, pos);
324  MSG_ReadDir (&net_message, dir);
325 
326  color = MSG_ReadByte (&net_message);
327 
329 
330  CL_ParticleEffect (pos, dir, color, count);
331 }

◆ CL_ParsePlayerBeam()

int CL_ParsePlayerBeam ( struct model_s model)

Definition at line 440 of file cl_tent.c.

441 {
442  int ent;
443  vec3_t start, end, offset;
444  beam_t *b;
445  int i;
446 
447  ent = MSG_ReadShort (&net_message);
448 
449  MSG_ReadPos (&net_message, start);
450  MSG_ReadPos (&net_message, end);
451  // PMM - network optimization
452  if (model == cl_mod_heatbeam)
453  VectorSet(offset, 2, 7, -3);
454  else if (model == cl_mod_monster_heatbeam)
455  {
457  VectorSet(offset, 0, 0, 0);
458  }
459  else
460  MSG_ReadPos (&net_message, offset);
461 
462 // Com_Printf ("end- %f %f %f\n", end[0], end[1], end[2]);
463 
464 // override any beam with the same entity
465 // PMM - For player beams, we only want one per player (entity) so..
466  for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
467  {
468  if (b->entity == ent)
469  {
470  b->entity = ent;
471  b->model = model;
472  b->endtime = cl.time + 200;
473  VectorCopy (start, b->start);
474  VectorCopy (end, b->end);
475  VectorCopy (offset, b->offset);
476  return ent;
477  }
478  }
479 
480 // find a free beam
481  for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
482  {
483  if (!b->model || b->endtime < cl.time)
484  {
485  b->entity = ent;
486  b->model = model;
487  b->endtime = cl.time + 100; // PMM - this needs to be 100 to prevent multiple heatbeams
488  VectorCopy (start, b->start);
489  VectorCopy (end, b->end);
490  VectorCopy (offset, b->offset);
491  return ent;
492  }
493  }
494  Com_Printf ("beam list overflow!\n");
495  return ent;
496 }

Referenced by CL_ParseTEnt().

◆ CL_ParseSteam()

void CL_ParseSteam ( void  )

Definition at line 603 of file cl_tent.c.

604 {
605  vec3_t pos, dir;
606  int id, i;
607  int r;
608  int cnt;
609  int color;
610  int magnitude;
611  cl_sustain_t *s, *free_sustain;
612 
613  id = MSG_ReadShort (&net_message); // an id of -1 is an instant effect
614  if (id != -1) // sustains
615  {
616 // Com_Printf ("Sustain effect id %d\n", id);
617  free_sustain = NULL;
618  for (i=0, s=cl_sustains; i<MAX_SUSTAINS; i++, s++)
619  {
620  if (s->id == 0)
621  {
622  free_sustain = s;
623  break;
624  }
625  }
626  if (free_sustain)
627  {
628  s->id = id;
629  s->count = MSG_ReadByte (&net_message);
630  MSG_ReadPos (&net_message, s->org);
631  MSG_ReadDir (&net_message, s->dir);
633  s->color = r & 0xff;
634  s->magnitude = MSG_ReadShort (&net_message);
635  s->endtime = cl.time + MSG_ReadLong (&net_message);
636  s->think = CL_ParticleSteamEffect2;
637  s->thinkinterval = 100;
638  s->nextthink = cl.time;
639  }
640  else
641  {
642 // Com_Printf ("No free sustains!\n");
643  // FIXME - read the stuff anyway
644  cnt = MSG_ReadByte (&net_message);
645  MSG_ReadPos (&net_message, pos);
646  MSG_ReadDir (&net_message, dir);
648  magnitude = MSG_ReadShort (&net_message);
649  magnitude = MSG_ReadLong (&net_message); // really interval
650  }
651  }
652  else // instant
653  {
654  cnt = MSG_ReadByte (&net_message);
655  MSG_ReadPos (&net_message, pos);
656  MSG_ReadDir (&net_message, dir);
658  magnitude = MSG_ReadShort (&net_message);
659  color = r & 0xff;
660  CL_ParticleSteamEffect (pos, dir, color, cnt, magnitude);
661 // S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
662  }
663 }

Referenced by CL_ParseTEnt().

◆ CL_ParseTEnt()

void CL_ParseTEnt ( void  )

Definition at line 740 of file cl_tent.c.

741 {
742  int type;
743  vec3_t pos, pos2, dir;
744  explosion_t *ex;
745  int cnt;
746  int color;
747  int r;
748  int ent;
749  int magnitude;
750 
752 
753  switch (type)
754  {
755  case TE_BLOOD: // bullet hitting flesh
756  MSG_ReadPos (&net_message, pos);
757  MSG_ReadDir (&net_message, dir);
758 #ifdef QMAX
759  CL_BloodHit (pos, dir);
760 #else
761  CL_ParticleEffect (pos, dir, 0xe8, 60);
762 #endif
763  break;
764 
765  case TE_GUNSHOT: // bullet hitting wall
766  case TE_SPARKS:
767  case TE_BULLET_SPARKS:
768  MSG_ReadPos (&net_message, pos);
769  MSG_ReadDir (&net_message, dir);
770 #ifdef QMAX
771  if (type != TE_SPARKS)
772  {
773  CL_GunSmokeEffect (pos, dir);
774  re.AddStain(pos, 5, -175, -175, -175);
775  }
776 
777  if (type == TE_BULLET_SPARKS)
778  {
779  VectorScale(dir, 1.1, dir);
780  }
781 #else
782  if (type == TE_GUNSHOT)
783  CL_ParticleEffect (pos, dir, 0, 40);
784  else
785  CL_ParticleEffect (pos, dir, 0xe0, 6);
786 #endif
787  if (type != TE_SPARKS)
788  {
789 #ifndef QMAX
790  CL_SmokeAndFlash(pos);
791 #endif
792  // impact sound
793  cnt = rand()&15;
794  if (cnt == 1)
795  S_StartSound (pos, 0, 0, cl_sfx_ric1, 1, ATTN_NORM, 0);
796  else if (cnt == 2)
797  S_StartSound (pos, 0, 0, cl_sfx_ric2, 1, ATTN_NORM, 0);
798  else if (cnt == 3)
799  S_StartSound (pos, 0, 0, cl_sfx_ric3, 1, ATTN_NORM, 0);
800  }
801 #ifdef QMAX
802  //adding sparks
803  {
804  vec3_t color = { 255, 125, 10 };
805  CL_ParticleEffectSparks (pos, dir, color, (type == TE_GUNSHOT)? 5 : 10);
806  }
807 #endif
808  break;
809 
810  case TE_SCREEN_SPARKS:
811  case TE_SHIELD_SPARKS:
812  MSG_ReadPos (&net_message, pos);
813  MSG_ReadDir (&net_message, dir);
814  if (type == TE_SCREEN_SPARKS)
815  CL_ParticleEffect (pos, dir, 0xd0, 40);
816  else
817  CL_ParticleEffect (pos, dir, 0xb0, 40);
818  //FIXME : replace or remove this sound
819  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
820  break;
821 
822  case TE_SHOTGUN: // bullet hitting wall
823  MSG_ReadPos (&net_message, pos);
824  MSG_ReadDir (&net_message, dir);
825 #ifdef QMAX
826  CL_GunSmokeEffect (pos, dir);
827  {
828  vec3_t color = { 200, 100, 10 };
829  CL_ParticleEffectSparks (pos, dir, color, 8);
830  }
831  re.AddStain(pos, 7, -175, -175, -175);
832 #else
833  CL_ParticleEffect (pos, dir, 0, 20);
834  CL_SmokeAndFlash(pos);
835 #endif
836  break;
837 
838  case TE_SPLASH: // bullet hitting water
839  cnt = MSG_ReadByte (&net_message);
840  MSG_ReadPos (&net_message, pos);
841  MSG_ReadDir (&net_message, dir);
843  if (r > 6)
844  color = 0x00;
845  else
846  color = splash_color[r];
847  CL_ParticleEffect (pos, dir, color, cnt);
848 
849  if (r == SPLASH_SPARKS)
850  {
851  r = rand() & 3;
852  if (r == 0)
853  S_StartSound (pos, 0, 0, cl_sfx_spark5, 1, ATTN_STATIC, 0);
854  else if (r == 1)
855  S_StartSound (pos, 0, 0, cl_sfx_spark6, 1, ATTN_STATIC, 0);
856  else
857  S_StartSound (pos, 0, 0, cl_sfx_spark7, 1, ATTN_STATIC, 0);
858  }
859  break;
860 
861  case TE_LASER_SPARKS:
862  cnt = MSG_ReadByte (&net_message);
863  MSG_ReadPos (&net_message, pos);
864  MSG_ReadDir (&net_message, dir);
865  color = MSG_ReadByte (&net_message);
866  CL_ParticleEffect2 (pos, dir, color, cnt);
867  break;
868 
869  // RAFAEL
870  case TE_BLUEHYPERBLASTER:
871  MSG_ReadPos (&net_message, pos);
872  MSG_ReadPos (&net_message, dir);
873 #ifdef QMAX
874  CL_BlasterParticles (pos, dir, 40);
875 #else
876  CL_BlasterParticles (pos, dir);
877 #endif
878  break;
879 
880  case TE_BLASTER: // blaster hitting wall
881  MSG_ReadPos (&net_message, pos);
882  MSG_ReadDir (&net_message, dir);
883 #ifdef QMAX
884  CL_BlasterParticles (pos, dir, 40);
885 #else
886  CL_BlasterParticles (pos, dir);
887 
888  ex = CL_AllocExplosion ();
889  VectorCopy (pos, ex->ent.origin);
890  ex->ent.angles[0] = acos(dir[2])/M_PI*180;
891  // PMM - fixed to correct for pitch of 0
892  if (dir[0])
893  ex->ent.angles[1] = atan2(dir[1], dir[0])/M_PI*180;
894  else if (dir[1] > 0)
895  ex->ent.angles[1] = 90;
896  else if (dir[1] < 0)
897  ex->ent.angles[1] = 270;
898  else
899  ex->ent.angles[1] = 0;
900 
901  ex->type = ex_misc;
903  ex->start = cl.frame.servertime - 100;
904  ex->light = 150;
905  ex->lightcolor[0] = 1;
906  ex->lightcolor[1] = 1;
907  ex->ent.model = cl_mod_explode;
908  ex->frames = 4;
909 #endif
910  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
911  break;
912 
913  case TE_RAILTRAIL: // railgun effect
914  MSG_ReadPos (&net_message, pos);
916  CL_RailTrail (pos, pos2);
917  S_StartSound (pos2, 0, 0, cl_sfx_railg, 1, ATTN_NORM, 0);
918  break;
919 
920  case TE_EXPLOSION2:
923  MSG_ReadPos (&net_message, pos);
924 #ifdef QMAX
925  CL_G_Explode_SP(pos);
926 
927  // if (type!=TE_GRENADE_EXPLOSION_WATER)
928  // CL_Radius_Explode_SP(pos, 1.25);
929  // CL_ExplosionParticles (pos,1.25);
930  CL_ExplosionParticles (pos);
931 #else
932  ex = CL_AllocExplosion ();
933  VectorCopy (pos, ex->ent.origin);
934  ex->type = ex_poly;
936  ex->start = cl.frame.servertime - 100;
937  ex->light = 350;
938  ex->lightcolor[0] = 1.0;
939  ex->lightcolor[1] = 0.5;
940  ex->lightcolor[2] = 0.5;
941  ex->ent.model = cl_mod_explo4;
942  ex->frames = 19;
943  ex->baseframe = 30;
944  ex->ent.angles[1] = rand() % 360;
945  EXPLOSION_PARTICLES (pos);
946 #endif
948  S_StartSound (pos, 0, 0, cl_sfx_watrexp, 1, ATTN_NORM, 0);
949  else
950  S_StartSound (pos, 0, 0, cl_sfx_grenexp, 1, ATTN_NORM, 0);
951  break;
952 
953  // RAFAEL
954  case TE_PLASMA_EXPLOSION:
955  MSG_ReadPos (&net_message, pos);
956 #ifdef QMAX
957  CL_R_Explode_SP(pos);
958 // CL_ExplosionParticles (pos, 1);
959 // CL_ExplosionParticles (pos);
960 
961 #else
962  ex = CL_AllocExplosion ();
963  VectorCopy (pos, ex->ent.origin);
964  ex->type = ex_poly;
966  ex->start = cl.frame.servertime - 100;
967  ex->light = 350;
968  ex->lightcolor[0] = 1.0;
969  ex->lightcolor[1] = 0.5;
970  ex->lightcolor[2] = 0.5;
971  ex->ent.angles[1] = rand() % 360;
972  ex->ent.model = cl_mod_explo4;
973  if (frand() < 0.5)
974  ex->baseframe = 15;
975  ex->frames = 15;
976  EXPLOSION_PARTICLES (pos);
977 #endif
978  S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0);
979  break;
980 
981  case TE_EXPLOSION1_BIG:
982 #ifdef QMAX
983  // PMM
984  MSG_ReadPos (&net_message, pos);
985  // /*
986 // if (modType("dday"))
987 // {
988 // CL_Explosion_Particle (pos, 250, true, true);
989 // CL_ExplosionParticles (pos, 5);
990 // CL_Radius_Explode_SP(pos, 5);
991 // }
992 // else
993 // {
994  CL_Explosion_Particle (pos, 100, true, true);
995  //CL_ExplosionParticles (pos, 2);
996  CL_ExplosionParticles (pos);
997 // CL_Radius_Explode_SP(pos, 2);
998 // }
999  S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0);
1000  break;
1001 #endif
1002  case TE_EXPLOSION1_NP: // PMM
1003 #ifdef QMAX
1004  MSG_ReadPos (&net_message, pos);
1005  CL_Explosion_Particle (pos, 50, true, true);
1006  CL_ExplosionParticles (pos);
1007 // CL_ExplosionParticles (pos, 0.6666666);
1008 // CL_Radius_Explode_SP(pos, 0.6666666);
1009 
1010  S_StartSound (pos, 0, 0, cl_sfx_grenexp, 1, ATTN_NORM, 0);
1011  break;
1012 #endif
1013  case TE_EXPLOSION1:
1014  case TE_ROCKET_EXPLOSION:
1016  MSG_ReadPos (&net_message, pos);
1017 #ifdef QMAX
1018  CL_R_Explode_SP(pos);
1019  // CL_ExplosionParticles (pos, 1);
1020  CL_ExplosionParticles (pos);
1021 #else
1022  ex = CL_AllocExplosion ();
1023  VectorCopy (pos, ex->ent.origin);
1024  ex->type = ex_poly;
1026  ex->start = cl.frame.servertime - 100;
1027  ex->light = 350;
1028  ex->lightcolor[0] = 1.0;
1029  ex->lightcolor[1] = 0.5;
1030  ex->lightcolor[2] = 0.5;
1031  ex->ent.angles[1] = rand() % 360;
1032  if (type != TE_EXPLOSION1_BIG) // PMM
1033  ex->ent.model = cl_mod_explo4; // PMM
1034  else
1035  ex->ent.model = cl_mod_explo4_big;
1036  if (frand() < 0.5)
1037  ex->baseframe = 15;
1038  ex->frames = 15;
1039  if ((type != TE_EXPLOSION1_BIG) && (type != TE_EXPLOSION1_NP)) // PMM
1040  EXPLOSION_PARTICLES (pos); // PMM
1041 #endif
1043  S_StartSound (pos, 0, 0, cl_sfx_watrexp, 1, ATTN_NORM, 0);
1044  else
1045  S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0);
1046  break;
1047 
1048  case TE_BFG_EXPLOSION:
1049  MSG_ReadPos (&net_message, pos);
1050  ex = CL_AllocExplosion ();
1051  VectorCopy (pos, ex->ent.origin);
1052  ex->type = ex_poly;
1054  ex->start = cl.frame.servertime - 100;
1055  ex->light = 350;
1056  ex->lightcolor[0] = 0.0;
1057  ex->lightcolor[1] = 1.0;
1058  ex->lightcolor[2] = 0.0;
1059  ex->ent.model = cl_mod_bfg_explo;
1060  ex->ent.flags |= RF_TRANSLUCENT;
1061  ex->ent.alpha = 0.30;
1062  ex->frames = 4;
1063  break;
1064 
1065  case TE_BFG_BIGEXPLOSION:
1066  MSG_ReadPos (&net_message, pos);
1068  break;
1069 
1070  case TE_BFG_LASER:
1071  CL_ParseLaser (0xd0d1d2d3);
1072  break;
1073 
1074  case TE_BUBBLETRAIL:
1075  MSG_ReadPos (&net_message, pos);
1077  CL_BubbleTrail (pos, pos2);
1078  break;
1079 
1080  case TE_PARASITE_ATTACK:
1081  case TE_MEDIC_CABLE_ATTACK:
1083  break;
1084 
1085  case TE_BOSSTPORT: // boss teleporting to station
1086  MSG_ReadPos (&net_message, pos);
1088  S_StartSound (pos, 0, 0, S_RegisterSound ("misc/bigtele.wav"), 1, ATTN_NONE, 0);
1089  break;
1090 
1091  case TE_GRAPPLE_CABLE:
1093  break;
1094 
1095  // RAFAEL
1096  case TE_WELDING_SPARKS:
1097  cnt = MSG_ReadByte (&net_message);
1098  MSG_ReadPos (&net_message, pos);
1099  MSG_ReadDir (&net_message, dir);
1100  color = MSG_ReadByte (&net_message);
1101  CL_ParticleEffect2 (pos, dir, color, cnt);
1102 
1103  ex = CL_AllocExplosion ();
1104  VectorCopy (pos, ex->ent.origin);
1105  ex->type = ex_flash;
1106  // note to self
1107  // we need a better no draw flag
1108  ex->ent.flags = RF_BEAM;
1109  ex->start = cl.frame.servertime - 0.1;
1110  ex->light = 100 + (rand()%75);
1111  ex->lightcolor[0] = 1.0;
1112  ex->lightcolor[1] = 1.0;
1113  ex->lightcolor[2] = 0.3;
1114  ex->ent.model = cl_mod_flash;
1115  ex->frames = 2;
1116  break;
1117 
1118  case TE_GREENBLOOD:
1119  MSG_ReadPos (&net_message, pos);
1120  MSG_ReadDir (&net_message, dir);
1121  CL_ParticleEffect2 (pos, dir, 0xdf, 30);
1122  break;
1123 
1124  // RAFAEL
1125  case TE_TUNNEL_SPARKS:
1126  cnt = MSG_ReadByte (&net_message);
1127  MSG_ReadPos (&net_message, pos);
1128  MSG_ReadDir (&net_message, dir);
1129  color = MSG_ReadByte (&net_message);
1130  CL_ParticleEffect3 (pos, dir, color, cnt);
1131  break;
1132 
1133 //=============
1134 //PGM
1135  // PMM -following code integrated for flechette (different color)
1136  case TE_BLASTER2: // green blaster hitting wall
1137  case TE_FLECHETTE: // flechette
1138  MSG_ReadPos (&net_message, pos);
1139  MSG_ReadDir (&net_message, dir);
1140 
1141  // PMM
1142  if (type == TE_BLASTER2)
1143  CL_BlasterParticles2 (pos, dir, 0xd0);
1144  else
1145  CL_BlasterParticles2 (pos, dir, 0x6f); // 75
1146 
1147  ex = CL_AllocExplosion ();
1148  VectorCopy (pos, ex->ent.origin);
1149  ex->ent.angles[0] = acos(dir[2])/M_PI*180;
1150  // PMM - fixed to correct for pitch of 0
1151  if (dir[0])
1152  ex->ent.angles[1] = atan2(dir[1], dir[0])/M_PI*180;
1153  else if (dir[1] > 0)
1154  ex->ent.angles[1] = 90;
1155  else if (dir[1] < 0)
1156  ex->ent.angles[1] = 270;
1157  else
1158  ex->ent.angles[1] = 0;
1159 
1160  ex->type = ex_misc;
1162 
1163  // PMM
1164  if (type == TE_BLASTER2)
1165  ex->ent.skinnum = 1;
1166  else // flechette
1167  ex->ent.skinnum = 2;
1168 
1169  ex->start = cl.frame.servertime - 100;
1170  ex->light = 150;
1171  // PMM
1172  if (type == TE_BLASTER2)
1173  ex->lightcolor[1] = 1;
1174  else // flechette
1175  {
1176  ex->lightcolor[0] = 0.19;
1177  ex->lightcolor[1] = 0.41;
1178  ex->lightcolor[2] = 0.75;
1179  }
1180  ex->ent.model = cl_mod_explode;
1181  ex->frames = 4;
1182  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
1183  break;
1184 
1185 
1186  case TE_LIGHTNING:
1187 #ifdef QMAX
1188  ent = CL_ParseLightning (10);
1189 #else
1191 #endif
1193  break;
1194 
1195  case TE_DEBUGTRAIL:
1196  MSG_ReadPos (&net_message, pos);
1198  CL_DebugTrail (pos, pos2);
1199  break;
1200 
1201  case TE_PLAIN_EXPLOSION:
1202  MSG_ReadPos (&net_message, pos);
1203 
1204  ex = CL_AllocExplosion ();
1205  VectorCopy (pos, ex->ent.origin);
1206  ex->type = ex_poly;
1208  ex->start = cl.frame.servertime - 100;
1209  ex->light = 350;
1210  ex->lightcolor[0] = 1.0;
1211  ex->lightcolor[1] = 0.5;
1212  ex->lightcolor[2] = 0.5;
1213  ex->ent.angles[1] = rand() % 360;
1214  ex->ent.model = cl_mod_explo4;
1215  if (frand() < 0.5)
1216  ex->baseframe = 15;
1217  ex->frames = 15;
1219  S_StartSound (pos, 0, 0, cl_sfx_watrexp, 1, ATTN_NORM, 0);
1220  else
1221  S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0);
1222  break;
1223 
1224  case TE_FLASHLIGHT:
1225  MSG_ReadPos(&net_message, pos);
1226  ent = MSG_ReadShort(&net_message);
1227  CL_Flashlight(ent, pos);
1228  break;
1229 
1230  case TE_FORCEWALL:
1231  MSG_ReadPos(&net_message, pos);
1233  color = MSG_ReadByte (&net_message);
1234  CL_ForceWall(pos, pos2, color);
1235  break;
1236 
1237  case TE_HEATBEAM:
1239  break;
1240 
1241  case TE_MONSTER_HEATBEAM:
1243  break;
1244 
1245  case TE_HEATBEAM_SPARKS:
1246 // cnt = MSG_ReadByte (&net_message);
1247  cnt = 50;
1248  MSG_ReadPos (&net_message, pos);
1249  MSG_ReadDir (&net_message, dir);
1250 // r = MSG_ReadByte (&net_message);
1251 // magnitude = MSG_ReadShort (&net_message);
1252  r = 8;
1253  magnitude = 60;
1254  color = r & 0xff;
1255  CL_ParticleSteamEffect (pos, dir, color, cnt, magnitude);
1256  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
1257  break;
1258 
1259  case TE_HEATBEAM_STEAM:
1260 // cnt = MSG_ReadByte (&net_message);
1261  cnt = 20;
1262  MSG_ReadPos (&net_message, pos);
1263  MSG_ReadDir (&net_message, dir);
1264 // r = MSG_ReadByte (&net_message);
1265 // magnitude = MSG_ReadShort (&net_message);
1266 // color = r & 0xff;
1267  color = 0xe0;
1268  magnitude = 60;
1269  CL_ParticleSteamEffect (pos, dir, color, cnt, magnitude);
1270  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
1271  break;
1272 
1273  case TE_STEAM:
1274  CL_ParseSteam();
1275  break;
1276 
1277  case TE_BUBBLETRAIL2:
1278 // cnt = MSG_ReadByte (&net_message);
1279  cnt = 8;
1280  MSG_ReadPos (&net_message, pos);
1282  CL_BubbleTrail2 (pos, pos2, cnt);
1283  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
1284  break;
1285 
1286  case TE_MOREBLOOD:
1287  MSG_ReadPos (&net_message, pos);
1288  MSG_ReadDir (&net_message, dir);
1289  CL_ParticleEffect (pos, dir, 0xe8, 250);
1290  break;
1291 
1292  case TE_CHAINFIST_SMOKE:
1293  dir[0]=0; dir[1]=0; dir[2]=1;
1294  MSG_ReadPos(&net_message, pos);
1295  CL_ParticleSmokeEffect (pos, dir, 0, 20, 20);
1296  break;
1297 
1298  case TE_ELECTRIC_SPARKS:
1299  MSG_ReadPos (&net_message, pos);
1300  MSG_ReadDir (&net_message, dir);
1301 // CL_ParticleEffect (pos, dir, 109, 40);
1302  CL_ParticleEffect (pos, dir, 0x75, 40);
1303  //FIXME : replace or remove this sound
1304  S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
1305  break;
1306 
1307  case TE_TRACKER_EXPLOSION:
1308  MSG_ReadPos (&net_message, pos);
1309  CL_ColorFlash (pos, 0, 150, -1, -1, -1);
1310  CL_ColorExplosionParticles (pos, 0, 1);
1311 // CL_Tracker_Explode (pos);
1312  S_StartSound (pos, 0, 0, cl_sfx_disrexp, 1, ATTN_NORM, 0);
1313  break;
1314 
1315  case TE_TELEPORT_EFFECT:
1316  case TE_DBALL_GOAL:
1317  MSG_ReadPos (&net_message, pos);
1318  CL_TeleportParticles (pos);
1319  break;
1320 
1321  case TE_WIDOWBEAMOUT:
1322  CL_ParseWidow ();
1323  break;
1324 
1325  case TE_NUKEBLAST:
1326  CL_ParseNuke ();
1327  break;
1328 
1329  case TE_WIDOWSPLASH:
1330  MSG_ReadPos (&net_message, pos);
1331  CL_WidowSplash (pos);
1332  break;
1333 #if 0
1334  //NEW CUSTOM TEMP EVENTS
1335 
1336  case TE_LIGHTNINGFLARE: //-psychospaz
1337  {
1338  int num, entity;
1339 
1340  entity = MSG_ReadShort (&net_message);
1341  num = MSG_ReadShort (&net_message);
1342  MSG_ReadPos (&net_message, pos);
1343 
1344  //double up for opacity endurance
1345  CL_LightningFlare(pos, entity, 2*num);
1346  CL_LightningFlare(pos, entity, 2*num+1);
1347  }
1348  break;
1349  case TE_SMOKEPUFF: //hahaha server declared stains biotch - psychospaz
1350  {
1351  float size;
1352 
1353  MSG_ReadPos (&net_message, pos);
1354  MSG_ReadPos (&net_message, dir);
1356 
1357  CL_ParticleSmokeEffect (pos, dir, size);
1358  }
1359  break;
1360  case TE_STAIN: //hahaha server declared stains biotch - psychospaz
1361  {
1362  float intens;
1363  int i, color[3];
1364 
1365  MSG_ReadPos (&net_message, pos);
1366  intens = MSG_ReadFloat(&net_message);
1367  for (i=0;i<3;i++)
1368  color[i] = -MSG_ReadByte(&net_message);
1369 
1370  re.AddStain(pos, intens,
1371  color[0],
1372  color[1],
1373  color[2]);
1374  }
1375  break;
1376  case TE_FOOTPRINT:
1377  {
1378  float size;
1379  vec3_t color, angle;
1380 
1381  MSG_ReadPos (&net_message, pos);
1382  MSG_ReadPos (&net_message, dir);
1383  MSG_ReadPos (&net_message, color);
1385 
1386  angle[0] = anglemod(dir[0] + 180);
1387  angle[1] = anglemod(dir[1]);
1388  angle[2] = anglemod(dir[2]);
1389 
1390  CL_ParticleFootPrint (pos, angle, size, color);
1391  }
1392  break;
1393  case TE_FLAMEBURST:
1394  {
1395  float size;
1396 
1397  MSG_ReadPos (&net_message, pos);
1399 
1400  CL_FlameBurst (pos, size);
1401  }
1402  break;
1403  case TE_LASERSTUN:
1404  {
1405  int i;
1406  float size;
1407  vec3_t color;
1408 
1409  MSG_ReadPos (&net_message, pos);
1410  MSG_ReadPos (&net_message, dir);
1412  for (i=0;i<3;i++)
1413  color[i] = (float)MSG_ReadByte(&net_message);
1414 
1415  CL_LaserStun (pos, dir, color, size);
1416  }
1417  break;
1418  case TE_STUNBLAST:
1419  {
1420  int i;
1421  float size;
1422  vec3_t color;
1423 
1424  MSG_ReadPos (&net_message, pos);
1426  for (i=0;i<3;i++)
1427  color[i] = (float)MSG_ReadByte(&net_message);
1428 
1429  CL_StunBlast (pos, color, size);
1430  }
1431  break;
1432  case TE_DISRUPTOR_EXPLOSION:
1433  {
1434  float size;
1435 
1436  MSG_ReadPos (&net_message, pos);
1438 
1440 
1441  S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0);
1442  }
1443  break;
1444  case TE_DISINTEGRATE:
1445  {
1446  ent = MSG_ReadByte(&net_message);
1447  MSG_ReadPos (&net_message, pos);
1448  CL_Disintegrate (pos, ent);
1449  }
1450  break;
1451  case TE_LENSFLARE:
1452  {
1453  float size, time;
1454 
1455  MSG_ReadPos (&net_message, pos);
1456  MSG_ReadPos (&net_message, dir);
1458  time = MSG_ReadFloat (&net_message);
1459 
1460  CL_LensFlare(pos, dir, size, time);
1461  }
1462  break;
1463  case TE_WEATHERFX:
1464  {
1465  vec3_t color;
1466  int type;
1467  float size, time;
1468 
1469  MSG_ReadPos (&net_message, pos);
1470  MSG_ReadPos (&net_message, dir);
1471  MSG_ReadPos (&net_message, color);
1474  time = MSG_ReadFloat (&net_message);
1475 
1476  CL_WeatherFx(pos, dir, color, type, size, time);
1477  }
1478  break;
1479 
1480 #endif
1481 //PGM
1482 //==============
1483 
1484  default:
1485  Com_Error (ERR_DROP, "CL_ParseTEnt: bad type");
1486  }
1487 }

Referenced by CL_ParseServerMessage().

◆ CL_ParseWidow()

void CL_ParseWidow ( void  )

Definition at line 665 of file cl_tent.c.

666 {
667  vec3_t pos;
668  int id, i;
669  cl_sustain_t *s, *free_sustain;
670 
671  id = MSG_ReadShort (&net_message);
672 
673  free_sustain = NULL;
674  for (i=0, s=cl_sustains; i<MAX_SUSTAINS; i++, s++)
675  {
676  if (s->id == 0)
677  {
678  free_sustain = s;
679  break;
680  }
681  }
682  if (free_sustain)
683  {
684  s->id = id;
685  MSG_ReadPos (&net_message, s->org);
686  s->endtime = cl.time + 2100;
687  s->think = CL_Widowbeamout;
688  s->thinkinterval = 1;
689  s->nextthink = cl.time;
690  }
691  else // no free sustains
692  {
693  // FIXME - read the stuff anyway
694  MSG_ReadPos (&net_message, pos);
695  }
696 }

Referenced by CL_ParseTEnt().

◆ CL_ProcessSustain()

void CL_ProcessSustain ( )

Definition at line 2005 of file cl_tent.c.

2006 {
2007  cl_sustain_t *s;
2008  int i;
2009 
2010  for (i=0, s=cl_sustains; i< MAX_SUSTAINS; i++, s++)
2011  {
2012  if (s->id) {
2013  if ((s->endtime >= cl.time) && (cl.time >= s->nextthink))
2014  {
2015 // Com_Printf ("think %d %d %d\n", cl.time, s->nextthink, s->thinkinterval);
2016  s->think (s);
2017  }
2018  else if (s->endtime < cl.time)
2019  s->id = 0;
2020  }
2021  }
2022 }

Referenced by CL_AddTEnts().

◆ CL_RegisterTEntModels()

void CL_RegisterTEntModels ( void  )

Definition at line 188 of file cl_tent.c.

189 {
190  cl_mod_explode = re.RegisterModel ("models/objects/explode/tris.md2");
191  cl_mod_smoke = re.RegisterModel ("models/objects/smoke/tris.md2");
192  cl_mod_flash = re.RegisterModel ("models/objects/flash/tris.md2");
193  cl_mod_parasite_segment = re.RegisterModel ("models/monsters/parasite/segment/tris.md2");
194  cl_mod_grapple_cable = re.RegisterModel ("models/ctf/segment/tris.md2");
195  cl_mod_parasite_tip = re.RegisterModel ("models/monsters/parasite/tip/tris.md2");
196  cl_mod_explo4 = re.RegisterModel ("models/objects/r_explode/tris.md2");
197  cl_mod_bfg_explo = re.RegisterModel ("sprites/s_bfg2.sp2");
198  cl_mod_powerscreen = re.RegisterModel ("models/items/armor/effect/tris.md2");
199 
200 re.RegisterModel ("models/objects/laser/tris.md2");
201 re.RegisterModel ("models/objects/grenade2/tris.md2");
202 re.RegisterModel ("models/weapons/v_machn/tris.md2");
203 re.RegisterModel ("models/weapons/v_handgr/tris.md2");
204 re.RegisterModel ("models/weapons/v_shotg2/tris.md2");
205 re.RegisterModel ("models/objects/gibs/bone/tris.md2");
206 re.RegisterModel ("models/objects/gibs/sm_meat/tris.md2");
207 re.RegisterModel ("models/objects/gibs/bone2/tris.md2");
208 // RAFAEL
209 // re.RegisterModel ("models/objects/blaser/tris.md2");
210 
211 re.RegisterPic ("w_machinegun");
212 re.RegisterPic ("a_bullets");
213 re.RegisterPic ("i_health");
214 re.RegisterPic ("a_grenades");
215 
216 //ROGUE
217  cl_mod_explo4_big = re.RegisterModel ("models/objects/r_explode2/tris.md2");
218  cl_mod_lightning = re.RegisterModel ("models/proj/lightning/tris.md2");
219  cl_mod_heatbeam = re.RegisterModel ("models/proj/beam/tris.md2");
220  cl_mod_monster_heatbeam = re.RegisterModel ("models/proj/widowbeam/tris.md2");
221 //ROGUE
222 }

Referenced by CL_PrepRefresh().

◆ CL_RegisterTEntSounds()

void CL_RegisterTEntSounds ( void  )

Definition at line 141 of file cl_tent.c.

142 {
143  int i;
144  char name[MAX_QPATH];
145 
146  // PMM - version stuff
147 // Com_Printf ("%s\n", ROGUE_VERSION_STRING);
148  // PMM
149  cl_sfx_ric1 = S_RegisterSound ("world/ric1.wav");
150  cl_sfx_ric2 = S_RegisterSound ("world/ric2.wav");
151  cl_sfx_ric3 = S_RegisterSound ("world/ric3.wav");
152  cl_sfx_lashit = S_RegisterSound("weapons/lashit.wav");
153  cl_sfx_spark5 = S_RegisterSound ("world/spark5.wav");
154  cl_sfx_spark6 = S_RegisterSound ("world/spark6.wav");
155  cl_sfx_spark7 = S_RegisterSound ("world/spark7.wav");
156  cl_sfx_railg = S_RegisterSound ("weapons/railgf1a.wav");
157  cl_sfx_rockexp = S_RegisterSound ("weapons/rocklx1a.wav");
158  cl_sfx_grenexp = S_RegisterSound ("weapons/grenlx1a.wav");
159  cl_sfx_watrexp = S_RegisterSound ("weapons/xpld_wat.wav");
160  // RAFAEL
161  // cl_sfx_plasexp = S_RegisterSound ("weapons/plasexpl.wav");
162  S_RegisterSound ("player/land1.wav");
163 
164  S_RegisterSound ("player/fall2.wav");
165  S_RegisterSound ("player/fall1.wav");
166 
167  for (i=0 ; i<4 ; i++)
168  {
169  Com_sprintf (name, sizeof(name), "player/step%i.wav", i+1);
171  }
172 
173 //PGM
174  cl_sfx_lightning = S_RegisterSound ("weapons/tesla.wav");
175  cl_sfx_disrexp = S_RegisterSound ("weapons/disrupthit.wav");
176  // version stuff
177 // sprintf (name, "weapons/sound%d.wav", ROGUE_VERSION_ID);
178 // if (name[0] == 'w')
179 // name[0] = 'W';
180 //PGM
181 }

Referenced by CL_RegisterSounds().

◆ CL_SmokeAndFlash()

void CL_SmokeAndFlash ( vec3_t  origin)

Definition at line 292 of file cl_tent.c.

293 {
294  explosion_t *ex;
295 
296  ex = CL_AllocExplosion ();
297  VectorCopy (origin, ex->ent.origin);
298  ex->type = ex_misc;
299  ex->frames = 4;
300  ex->ent.flags = RF_TRANSLUCENT;
301  ex->start = cl.frame.servertime - 100;
302  ex->ent.model = cl_mod_smoke;
303 
304  ex = CL_AllocExplosion ();
305  VectorCopy (origin, ex->ent.origin);
306  ex->type = ex_flash;
307  ex->ent.flags = RF_FULLBRIGHT;
308  ex->frames = 2;
309  ex->start = cl.frame.servertime - 100;
310  ex->ent.model = cl_mod_flash;
311 }

Referenced by CL_ParseMuzzleFlash2(), and CL_ParseTEnt().

◆ 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(), and CL_ParseTEnt().

Variable Documentation

◆ cl_beams

beam_t cl_beams[MAX_BEAMS]

Definition at line 57 of file cl_tent.c.

Referenced by CL_AddBeams(), CL_ClearTEnts(), CL_ParseBeam(), CL_ParseBeam2(), and CL_ParseLightning().

◆ cl_explosions

explosion_t cl_explosions[MAX_EXPLOSIONS]

Definition at line 44 of file cl_tent.c.

Referenced by CL_AddExplosions(), CL_AllocExplosion(), and CL_ClearTEnts().

◆ cl_lasers

laser_t cl_lasers[MAX_LASERS]

Definition at line 68 of file cl_tent.c.

Referenced by CL_AddLasers(), CL_ClearTEnts(), and CL_ParseLaser().

◆ cl_mod_bfg_explo

struct model_s* cl_mod_bfg_explo

Definition at line 122 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_explo4

struct model_s* cl_mod_explo4

Definition at line 121 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_explo4_big

struct model_s* cl_mod_explo4_big

Definition at line 133 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_explode

struct model_s* cl_mod_explode

Definition at line 115 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_flash

struct model_s* cl_mod_flash

Definition at line 117 of file cl_tent.c.

Referenced by CL_ParseTEnt(), CL_RegisterTEntModels(), and CL_SmokeAndFlash().

◆ cl_mod_grapple_cable

struct model_s* cl_mod_grapple_cable

Definition at line 119 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_heatbeam

struct model_s* cl_mod_heatbeam

◆ cl_mod_lightning

struct model_s* cl_mod_lightning

Definition at line 130 of file cl_tent.c.

Referenced by CL_AddBeams(), CL_AddPlayerBeams(), CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_monster_heatbeam

struct model_s* cl_mod_monster_heatbeam

Definition at line 132 of file cl_tent.c.

Referenced by CL_ParsePlayerBeam(), CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_parasite_segment

struct model_s* cl_mod_parasite_segment

Definition at line 118 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntModels().

◆ cl_mod_parasite_tip

struct model_s* cl_mod_parasite_tip

Definition at line 120 of file cl_tent.c.

Referenced by CL_RegisterTEntModels().

◆ cl_mod_plasmaexplo

struct model_s* cl_mod_plasmaexplo

Definition at line 125 of file cl_tent.c.

◆ cl_mod_powerscreen

struct model_s* cl_mod_powerscreen

Definition at line 123 of file cl_tent.c.

Referenced by CL_AddPacketEntities(), and CL_RegisterTEntModels().

◆ cl_mod_smoke

struct model_s* cl_mod_smoke

Definition at line 116 of file cl_tent.c.

Referenced by CL_RegisterTEntModels(), and CL_SmokeAndFlash().

◆ cl_playerbeams

beam_t cl_playerbeams[MAX_BEAMS]

Definition at line 59 of file cl_tent.c.

Referenced by CL_AddPlayerBeams(), CL_ClearTEnts(), and CL_ParsePlayerBeam().

◆ cl_sfx_disrexp

struct sfx_s* cl_sfx_disrexp

Definition at line 129 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_footsteps

struct sfx_s* cl_sfx_footsteps[4]

Definition at line 113 of file cl_tent.c.

Referenced by CL_EntityEvent(), and CL_RegisterTEntSounds().

◆ cl_sfx_grenexp

struct sfx_s* cl_sfx_grenexp

Definition at line 109 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_lashit

struct sfx_s* cl_sfx_lashit

Definition at line 103 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_lightning

struct sfx_s* cl_sfx_lightning

Definition at line 128 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_plasexp

struct sfx_s* cl_sfx_plasexp

Definition at line 112 of file cl_tent.c.

◆ cl_sfx_railg

struct sfx_s* cl_sfx_railg

Definition at line 107 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_ric1

struct sfx_s* cl_sfx_ric1

Definition at line 100 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_ric2

struct sfx_s* cl_sfx_ric2

Definition at line 101 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_ric3

struct sfx_s* cl_sfx_ric3

Definition at line 102 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_rockexp

struct sfx_s* cl_sfx_rockexp

Definition at line 108 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_spark5

struct sfx_s* cl_sfx_spark5

Definition at line 104 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_spark6

struct sfx_s* cl_sfx_spark6

Definition at line 105 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_spark7

struct sfx_s* cl_sfx_spark7

Definition at line 106 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sfx_watrexp

struct sfx_s* cl_sfx_watrexp

Definition at line 110 of file cl_tent.c.

Referenced by CL_ParseTEnt(), and CL_RegisterTEntSounds().

◆ cl_sustains

◆ hand

cvar_t* hand

Definition at line 99 of file cl_main.c.

Referenced by CL_AddPlayerBeams(), CL_InitLocal(), and PlayerConfig_MenuInit().

◆ splash_color

byte splash_color[] = {0x00, 0xe0, 0xb0, 0x50, 0xd0, 0xe0, 0xe8}
static

Definition at line 738 of file cl_tent.c.

Referenced by CL_ParseTEnt().

ex_misc
@ ex_misc
Definition: cl_tent.c:26
cl_sfx_ric2
struct sfx_s * cl_sfx_ric2
Definition: cl_tent.c:101
RF_TRANSLUCENT
#define RF_TRANSLUCENT
Definition: q_shared.h:618
cl_mod_monster_heatbeam
struct model_s * cl_mod_monster_heatbeam
Definition: cl_tent.c:132
TE_EXPLOSION1_BIG
@ TE_EXPLOSION1_BIG
Definition: q_shared.h:989
RF_NOSHADOW
#define RF_NOSHADOW
Definition: q_shared.h:626
edict_s::s
entity_state_t s
Definition: g_local.h:964
cl_mod_parasite_segment
struct model_s * cl_mod_parasite_segment
Definition: cl_tent.c:118
refdef_t::vieworg
float vieworg[3]
Definition: ref.h:124
TE_PARASITE_ATTACK
@ TE_PARASITE_ATTACK
Definition: q_shared.h:951
particle_s::vel
vec3_t vel
Definition: client.h:416
cl_sfx_spark5
struct sfx_s * cl_sfx_spark5
Definition: cl_tent.c:104
CL_AllocExplosion
explosion_t * CL_AllocExplosion(void)
Definition: cl_tent.c:259
CL_ParsePlayerBeam
int CL_ParsePlayerBeam(struct model_s *model)
Definition: cl_tent.c:440
edict_s::pos2
vec3_t pos2
Definition: g_local.h:1022
CL_AddExplosions
void CL_AddExplosions(void)
Definition: cl_tent.c:1886
CL_WidowSplash
void CL_WidowSplash(vec3_t org)
Definition: cl_newfx.c:1140
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
entity_s::origin
float origin[3]
Definition: ref.h:57
entity_s::model
struct model_s * model
Definition: ref.h:51
TE_SHIELD_SPARKS
@ TE_SHIELD_SPARKS
Definition: q_shared.h:948
cl_sustains
cl_sustain_t cl_sustains[MAX_SUSTAINS]
Definition: cl_tent.c:71
edict_s::model
char * model
Definition: g_local.h:998
TE_HEATBEAM_STEAM
@ TE_HEATBEAM_STEAM
Definition: q_shared.h:980
CL_RailTrail
void CL_RailTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1750
client_state_t::frames
frame_t frames[UPDATE_BACKUP]
Definition: client.h:138
TE_GRENADE_EXPLOSION_WATER
@ TE_GRENADE_EXPLOSION_WATER
Definition: q_shared.h:953
CL_BlasterParticles
void CL_BlasterParticles(vec3_t org, vec3_t dir)
Definition: cl_fx.c:1360
ex_poly
@ ex_poly
Definition: cl_tent.c:26
TE_SHOTGUN
@ TE_SHOTGUN
Definition: q_shared.h:939
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
TE_CHAINFIST_SMOKE
@ TE_CHAINFIST_SMOKE
Definition: q_shared.h:981
CL_ParticleEffect2
void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1055
beam_t::endtime
int endtime
Definition: cl_tent.c:53
client_state_t::v_forward
vec3_t v_forward
Definition: client.h:153
TE_EXPLOSION1
@ TE_EXPLOSION1
Definition: q_shared.h:940
CL_ParseWidow
void CL_ParseWidow(void)
Definition: cl_tent.c:665
CL_FlameBurst
void CL_FlameBurst(vec3_t pos, float size)
Definition: cl_fxmax.c:3569
TE_HEATBEAM
@ TE_HEATBEAM
Definition: q_shared.h:974
particle_s::time
float time
Definition: client.h:413
client_state_t::v_up
vec3_t v_up
Definition: client.h:153
TE_ROCKET_EXPLOSION_WATER
@ TE_ROCKET_EXPLOSION_WATER
Definition: q_shared.h:952
cl_sustain
Definition: client.h:366
TE_BLOOD
@ TE_BLOOD
Definition: q_shared.h:936
particle_s::accel
vec3_t accel
Definition: client.h:417
cl_sfx_grenexp
struct sfx_s * cl_sfx_grenexp
Definition: cl_tent.c:109
TE_SPLASH
@ TE_SPLASH
Definition: q_shared.h:945
addParticleLight
void addParticleLight(cparticle_t *p, float light, float lightvel, float lcol0, float lcol1, float lcol2)
Definition: cl_fxmax.c:1059
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
TE_BUBBLETRAIL
@ TE_BUBBLETRAIL
Definition: q_shared.h:946
ex_poly2
@ ex_poly2
Definition: cl_tent.c:26
cl_mod_explo4
struct model_s * cl_mod_explo4
Definition: cl_tent.c:121
CL_TeleportParticles
void CL_TeleportParticles(vec3_t org)
Definition: cl_fx.c:2284
TE_ELECTRIC_SPARKS
@ TE_ELECTRIC_SPARKS
Definition: q_shared.h:982
CL_ParseBeam2
int CL_ParseBeam2(struct model_s *model)
Definition: cl_tent.c:386
player_state_t::gunoffset
vec3_t gunoffset
Definition: q_shared.h:1210
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:178
TE_RAILTRAIL
@ TE_RAILTRAIL
Definition: q_shared.h:938
TE_MEDIC_CABLE_ATTACK
@ TE_MEDIC_CABLE_ATTACK
Definition: q_shared.h:954
TE_WIDOWBEAMOUT
@ TE_WIDOWBEAMOUT
Definition: q_shared.h:986
CL_ParticleSmokeEffect
void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:1331
cl_explosions
explosion_t cl_explosions[MAX_EXPLOSIONS]
Definition: cl_tent.c:44
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
CL_LightningFlare
void CL_LightningFlare(vec3_t start, int srcEnt, int dstEnt)
Definition: cl_fxmax.c:1579
entity_s::skinnum
int skinnum
Definition: ref.h:70
TE_HEATBEAM_SPARKS
@ TE_HEATBEAM_SPARKS
Definition: q_shared.h:979
VectorClear
#define VectorClear(a)
Definition: q_shared.h:159
i
int i
Definition: q_shared.c:305
explosion_t::type
exptype_t type
Definition: cl_tent.c:31
TE_TUNNEL_SPARKS
@ TE_TUNNEL_SPARKS
Definition: q_shared.h:964
explosion_t::baseframe
int baseframe
Definition: cl_tent.c:38
beam_t::dest_entity
int dest_entity
Definition: cl_tent.c:51
particle_s::org
vec3_t org
Definition: client.h:415
CL_DebugTrail
void CL_DebugTrail(vec3_t start, vec3_t end)
Definition: cl_newfx.c:140
ATTN_STATIC
#define ATTN_STATIC
Definition: q_shared.h:1021
cl_sfx_disrexp
struct sfx_s * cl_sfx_disrexp
Definition: cl_tent.c:129
splash_color
static byte splash_color[]
Definition: cl_tent.c:738
entity_s::flags
int flags
Definition: ref.h:76
client_state_t::refdef
refdef_t refdef
Definition: client.h:151
M_PI
#define M_PI
Definition: q_shared.h:135
type
GLenum type
Definition: qgl_win.c:72
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:1019
TE_EXPLOSION1_NP
@ TE_EXPLOSION1_NP
Definition: q_shared.h:990
explosion_t
Definition: cl_tent.c:29
CL_Heatbeam
void CL_Heatbeam(vec3_t start, vec3_t forward)
Definition: cl_newfx.c:615
TE_FLASHLIGHT
@ TE_FLASHLIGHT
Definition: q_shared.h:972
anglemod
float anglemod(float a)
Definition: q_shared.c:293
TE_EXPLOSION2
@ TE_EXPLOSION2
Definition: q_shared.h:941
TE_FORCEWALL
@ TE_FORCEWALL
Definition: q_shared.h:973
CL_ParseBeam
int CL_ParseBeam(struct model_s *model)
Definition: cl_tent.c:338
TE_GRENADE_EXPLOSION
@ TE_GRENADE_EXPLOSION
Definition: q_shared.h:943
explosion_t::lightcolor
vec3_t lightcolor
Definition: cl_tent.c:36
TE_BUBBLETRAIL2
@ TE_BUBBLETRAIL2
Definition: q_shared.h:977
j
GLint j
Definition: qgl_win.c:150
particle_s::next
struct particle_s * next
Definition: client.h:411
MAX_BEAMS
#define MAX_BEAMS
Definition: cl_tent.c:47
MAX_LASERS
#define MAX_LASERS
Definition: cl_tent.c:62
CL_Widowbeamout
void CL_Widowbeamout(cl_sustain_t *self)
Definition: cl_newfx.c:1062
CL_Disintegrate
void CL_Disintegrate(vec3_t pos, int ent)
Definition: cl_fxmax.c:3563
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
cl_sfx_watrexp
struct sfx_s * cl_sfx_watrexp
Definition: cl_tent.c:110
RF_BEAM
#define RF_BEAM
Definition: q_shared.h:620
particle_s::alphavel
float alphavel
Definition: client.h:426
particle_s
Definition: client.h:409
TE_BFG_BIGEXPLOSION
@ TE_BFG_BIGEXPLOSION
Definition: q_shared.h:956
cl_mod_bfg_explo
struct model_s * cl_mod_bfg_explo
Definition: cl_tent.c:122
beam_t
Definition: cl_tent.c:48
beam_t::end
vec3_t end
Definition: cl_tent.c:55
edict_s::angle
float angle
Definition: g_local.h:1010
entity_s::alpha
float alpha
Definition: ref.h:73
cl_sfx_lightning
struct sfx_s * cl_sfx_lightning
Definition: cl_tent.c:128
S_RegisterSound
sfx_t * S_RegisterSound(char *name)
Definition: snd_dma.c:305
r
GLdouble GLdouble r
Definition: qgl_win.c:336
CL_SmokeAndFlash
void CL_SmokeAndFlash(vec3_t origin)
Definition: cl_tent.c:292
MAX_SUSTAINS
#define MAX_SUSTAINS
Definition: client.h:381
TE_BFG_EXPLOSION
@ TE_BFG_EXPLOSION
Definition: q_shared.h:955
cl_sfx_lashit
struct sfx_s * cl_sfx_lashit
Definition: cl_tent.c:103
CL_Disruptor_Explosion_Particle
void CL_Disruptor_Explosion_Particle(vec3_t org, float size)
Definition: cl_fxmax.c:1734
explosion_t::start
float start
Definition: cl_tent.c:37
cl_sfx_railg
struct sfx_s * cl_sfx_railg
Definition: cl_tent.c:107
forward
static vec3_t forward
Definition: p_view.c:29
MSG_ReadDir
void MSG_ReadDir(sizebuf_t *sb, vec3_t dir)
Definition: common.c:483
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
cl_beams
beam_t cl_beams[MAX_BEAMS]
Definition: cl_tent.c:57
CL_ParseLightning
int CL_ParseLightning(struct model_s *model)
Definition: cl_tent.c:504
cl_mod_flash
struct model_s * cl_mod_flash
Definition: cl_tent.c:117
beam_t::entity
int entity
Definition: cl_tent.c:50
TE_SPARKS
@ TE_SPARKS
Definition: q_shared.h:944
CL_Flashlight
void CL_Flashlight(int ent, vec3_t pos)
Definition: cl_newfx.c:93
TE_GRAPPLE_CABLE
@ TE_GRAPPLE_CABLE
Definition: q_shared.h:959
client_state_t::lerpfrac
float lerpfrac
Definition: client.h:149
entity_s::oldframe
int oldframe
Definition: ref.h:64
pExplosionThink
void pExplosionThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1621
TE_ROCKET_EXPLOSION
@ TE_ROCKET_EXPLOSION
Definition: q_shared.h:942
cl_mod_heatbeam
struct model_s * cl_mod_heatbeam
Definition: cl_tent.c:131
particle_s::alpha
float alpha
Definition: client.h:425
cl_sfx_footsteps
struct sfx_s * cl_sfx_footsteps[4]
Definition: cl_tent.c:113
laser_t
Definition: cl_tent.c:63
ex_flash
@ ex_flash
Definition: cl_tent.c:26
cvar_s::value
float value
Definition: q_shared.h:324
entity_s::backlerp
float backlerp
Definition: ref.h:69
SPLASH_SPARKS
#define SPLASH_SPARKS
Definition: q_shared.h:996
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *msg_read)
Definition: common.c:722
CL_ColorFlash
void CL_ColorFlash(vec3_t pos, int ent, int intensity, float r, float g, float b)
Definition: cl_newfx.c:112
CL_GunSmokeEffect
void CL_GunSmokeEffect(vec3_t org, vec3_t dir)
random
#define random()
Definition: g_local.h:509
EXPLODESTAININTESITY
#define EXPLODESTAININTESITY
Definition: cl_fxmax.c:1647
frame_t::valid
qboolean valid
Definition: client.h:65
CL_ProcessSustain
void CL_ProcessSustain()
Definition: cl_tent.c:2005
cl_mod_smoke
struct model_s * cl_mod_smoke
Definition: cl_tent.c:116
CL_ColorExplosionParticles
void CL_ColorExplosionParticles(vec3_t org, int color8, int run)
Definition: cl_newfx.c:1269
frame_t::serverframe
int serverframe
Definition: client.h:66
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
NULL
#define NULL
Definition: q_shared.h:60
client_state_t::frame
frame_t frame
Definition: client.h:136
explosion_t::ent
entity_t ent
Definition: cl_tent.c:32
CL_ForceWall
void CL_ForceWall(vec3_t start, vec3_t end, int color8)
Definition: cl_newfx.c:261
setupParticle
cparticle_t * setupParticle(float angle0, float angle1, float angle2, float org0, float org1, float org2, float vel0, float vel1, float vel2, float accel0, float accel1, float accel2, float color0, float color1, float color2, float colorvel0, float colorvel1, float colorvel2, float alpha, float alphavel, float size, float sizevel, int image, int flags, void(*think)(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time), qboolean thinknext)
Definition: cl_fxmax.c:978
cl_mod_parasite_tip
struct model_s * cl_mod_parasite_tip
Definition: cl_tent.c:120
TE_PLAIN_EXPLOSION
@ TE_PLAIN_EXPLOSION
Definition: q_shared.h:971
CL_MonsterPlasma_Shell
void CL_MonsterPlasma_Shell(vec3_t origin)
Definition: cl_newfx.c:1029
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
EXPLOSION_PARTICLES
#define EXPLOSION_PARTICLES(x)
Definition: cl_tent.c:97
client_state_t::playernum
int playernum
Definition: client.h:176
TE_NUKEBLAST
@ TE_NUKEBLAST
Definition: q_shared.h:987
TE_DBALL_GOAL
@ TE_DBALL_GOAL
Definition: q_shared.h:985
client_state_t::time
int time
Definition: client.h:147
refexport_t::RegisterModel
struct model_s *(* RegisterModel)(char *name)
Definition: ref.h:176
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
TE_MOREBLOOD
@ TE_MOREBLOOD
Definition: q_shared.h:978
beam_t::model
struct model_s * model
Definition: cl_tent.c:52
name
cvar_t * name
Definition: cl_main.c:94
cl_mod_powerscreen
struct model_s * cl_mod_powerscreen
Definition: cl_tent.c:123
TE_SCREEN_SPARKS
@ TE_SCREEN_SPARKS
Definition: q_shared.h:947
TE_PLASMA_EXPLOSION
@ TE_PLASMA_EXPLOSION
Definition: q_shared.h:963
CL_ParseLaser
void CL_ParseLaser(int colors)
Definition: cl_tent.c:557
CL_ParticleSteamEffect2
void CL_ParticleSteamEffect2(cl_sustain_t *self)
Definition: cl_newfx.c:888
TE_WIDOWSPLASH
@ TE_WIDOWSPLASH
Definition: q_shared.h:988
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:157
CL_Nukeblast
void CL_Nukeblast(cl_sustain_t *self)
Definition: cl_newfx.c:1101
re
refexport_t re
Definition: vid_dll.c:31
frame_t::playerstate
player_state_t playerstate
Definition: client.h:70
V_AddEntity
void V_AddEntity(entity_t *ent)
Definition: cl_view.c:97
MSG_ReadFloat
float MSG_ReadFloat(sizebuf_t *msg_read)
Definition: common.c:767
entity_s::frame
int frame
Definition: ref.h:58
client_state_t::v_right
vec3_t v_right
Definition: client.h:153
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
vec_t
float vec_t
Definition: q_shared.h:126
laser_t::ent
entity_t ent
Definition: cl_tent.c:65
ex_mflash
@ ex_mflash
Definition: cl_tent.c:26
TE_LASER_SPARKS
@ TE_LASER_SPARKS
Definition: q_shared.h:950
cl_mod_explo4_big
struct model_s * cl_mod_explo4_big
Definition: cl_tent.c:133
TE_BOSSTPORT
@ TE_BOSSTPORT
Definition: q_shared.h:957
TE_WELDING_SPARKS
@ TE_WELDING_SPARKS
Definition: q_shared.h:960
exptype_t
exptype_t
Definition: cl_tent.c:24
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
MSG_ReadLong
int MSG_ReadLong(sizebuf_t *msg_read)
Definition: common.c:750
laser_t::endtime
int endtime
Definition: cl_tent.c:66
TE_GREENBLOOD
@ TE_GREENBLOOD
Definition: q_shared.h:961
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:1008
TE_BLUEHYPERBLASTER
@ TE_BLUEHYPERBLASTER
Definition: q_shared.h:962
TE_BFG_LASER
@ TE_BFG_LASER
Definition: q_shared.h:958
entity_s
Definition: ref.h:49
beam_t::offset
vec3_t offset
Definition: cl_tent.c:54
RF_FULLBRIGHT
#define RF_FULLBRIGHT
Definition: q_shared.h:616
sqrt
double sqrt(double x)
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
TE_TRACKER_EXPLOSION
@ TE_TRACKER_EXPLOSION
Definition: q_shared.h:983
TE_BLASTER
@ TE_BLASTER
Definition: q_shared.h:937
cl_mod_grapple_cable
struct model_s * cl_mod_grapple_cable
Definition: cl_tent.c:119
TE_DEBUGTRAIL
@ TE_DEBUGTRAIL
Definition: q_shared.h:970
TE_GUNSHOT
@ TE_GUNSHOT
Definition: q_shared.h:935
TE_FLECHETTE
@ TE_FLECHETTE
Definition: q_shared.h:991
CL_BloodHit
void CL_BloodHit(vec3_t org, vec3_t dir)
Definition: cl_fxmax.c:2006
cl_sfx_ric1
struct sfx_s * cl_sfx_ric1
Definition: cl_tent.c:100
cl_mod_explode
struct model_s * cl_mod_explode
Definition: cl_tent.c:115
CL_BubbleTrail2
void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist)
Definition: cl_newfx.c:445
MSG_ReadPos
void MSG_ReadPos(sizebuf_t *msg_read, vec3_t pos)
Definition: common.c:837
MAX_EXPLOSIONS
#define MAX_EXPLOSIONS
Definition: cl_tent.c:43
CL_LensFlare
void CL_LensFlare(vec3_t pos, vec3_t color, float size, float time)
Definition: cl_fxmax.c:3583
active_particles
cparticle_t * active_particles
Definition: cl_fx.c:62
hand
cvar_t * hand
Definition: cl_main.c:99
CL_ParticleEffectSparks
void CL_ParticleEffectSparks(vec3_t org, vec3_t dir, vec3_t color, int count)
Definition: cl_fxmax.c:2213
TE_TELEPORT_EFFECT
@ TE_TELEPORT_EFFECT
Definition: q_shared.h:984
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:161
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:102
player_state_t
Definition: q_shared.h:1198
cl_sfx_ric3
struct sfx_s * cl_sfx_ric3
Definition: cl_tent.c:102
TE_STEAM
@ TE_STEAM
Definition: q_shared.h:976
TE_LIGHTNING
@ TE_LIGHTNING
Definition: q_shared.h:969
VectorCompare
int VectorCompare(vec3_t v1, vec3_t v2)
Definition: q_shared.c:672
CL_ParseNuke
void CL_ParseNuke(void)
Definition: cl_tent.c:698
ex_free
@ ex_free
Definition: cl_tent.c:26
CL_BlasterParticles2
void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color)
Definition: cl_newfx.c:1378
crand
float crand(void)
Definition: common.c:1403
CL_AddBeams
void CL_AddBeams(void)
Definition: cl_tent.c:1494
frame_t
Definition: client.h:63
CL_BigTeleportParticles
void CL_BigTeleportParticles(vec3_t org)
Definition: cl_fx.c:1313
CL_BubbleTrail
void CL_BubbleTrail(vec3_t start, vec3_t end)
Definition: cl_fx.c:1909
CL_BFGExplosionParticles
void CL_BFGExplosionParticles(vec3_t org)
Definition: cl_fx.c:2245
CL_Explosion_Particle
void CL_Explosion_Particle(vec3_t org, float size, qboolean large, qboolean rocket)
Definition: cl_fxmax.c:1648
CL_StunBlast
void CL_StunBlast(vec3_t pos, vec3_t color, float size)
Definition: cl_fxmax.c:1161
CL_WeatherFx
void CL_WeatherFx(vec3_t org, vec3_t vec, vec3_t color, int type, float size, float time)
Definition: cl_fxmax.c:1884
free_particles
cparticle_t * free_particles
Definition: cl_fx.c:62
CL_ParticleEffect3
void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1101
edict_s::size
vec3_t size
Definition: g_local.h:985
frame_t::servertime
int servertime
Definition: client.h:67
TE_MONSTER_HEATBEAM
@ TE_MONSTER_HEATBEAM
Definition: q_shared.h:975
cl_sfx_spark6
struct sfx_s * cl_sfx_spark6
Definition: cl_tent.c:105
CL_LaserStun
void CL_LaserStun(vec3_t pos, vec3_t direction, vec3_t color, float size)
Definition: cl_fxmax.c:1195
UPDATE_MASK
#define UPDATE_MASK
Definition: qcommon.h:192
cl
client_state_t cl
Definition: cl_main.c:106
explosion_t::frames
int frames
Definition: cl_tent.c:34
CL_ParseSteam
void CL_ParseSteam(void)
Definition: cl_tent.c:603
beam_t::start
vec3_t start
Definition: cl_tent.c:55
particle_rexplosion1
@ particle_rexplosion1
Definition: particles.h:15
CL_AddLasers
void CL_AddLasers(void)
Definition: cl_tent.c:1992
entity_s::oldorigin
float oldorigin[3]
Definition: ref.h:63
PARTICLE_GRAVITY
#define PARTICLE_GRAVITY
Definition: client.h:453
TE_BULLET_SPARKS
@ TE_BULLET_SPARKS
Definition: q_shared.h:949
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
cl_playerbeams
beam_t cl_playerbeams[MAX_BEAMS]
Definition: cl_tent.c:59
CL_ParticleEffect
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color, int count)
Definition: cl_fx.c:1011
CL_AddPlayerBeams
void CL_AddPlayerBeams(void)
Definition: cl_tent.c:1634
entity_s::angles
float angles[3]
Definition: ref.h:52
CL_ParticleFootPrint
void CL_ParticleFootPrint(vec3_t org, vec3_t angle, float size, vec3_t color)
Definition: cl_fxmax.c:2243
cl_mod_lightning
struct model_s * cl_mod_lightning
Definition: cl_tent.c:130
particle_s::color
float color
Definition: client.h:422
TE_BLASTER2
@ TE_BLASTER2
Definition: q_shared.h:966
count
GLint GLsizei count
Definition: qgl_win.c:128
cl_sfx_rockexp
struct sfx_s * cl_sfx_rockexp
Definition: cl_tent.c:108
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
CL_ParticleSteamEffect
void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:844
explosion_t::light
float light
Definition: cl_tent.c:35
V_AddLight
void V_AddLight(vec3_t org, float intensity, float r, float g, float b)
Definition: cl_view.c:157
cl_sfx_spark7
struct sfx_s * cl_sfx_spark7
Definition: cl_tent.c:106
ex_explosion
@ ex_explosion
Definition: cl_tent.c:26
cl_lasers
laser_t cl_lasers[MAX_LASERS]
Definition: cl_tent.c:68
CL_ExplosionParticles
void CL_ExplosionParticles(vec3_t org)
Definition: cl_fx.c:1278