mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
Major particle interface cleanup, several bugfixes, and minor performance improvements. Oh, check out "/help easter_eggs" (gl-only, at the moment).
This commit is contained in:
parent
8a47406dcd
commit
f66b7a93e5
19 changed files with 631 additions and 415 deletions
|
@ -59,6 +59,7 @@ const char *MSG_ReadString (msg_t *msg);
|
||||||
const char *MSG_ReadStringLine (msg_t *msg);
|
const char *MSG_ReadStringLine (msg_t *msg);
|
||||||
|
|
||||||
float MSG_ReadCoord (msg_t *msg);
|
float MSG_ReadCoord (msg_t *msg);
|
||||||
|
void MSG_ReadCoord3 (msg_t *msg, vec3_t coord);
|
||||||
float MSG_ReadAngle (msg_t *msg);
|
float MSG_ReadAngle (msg_t *msg);
|
||||||
float MSG_ReadAngle16 (msg_t *msg);
|
float MSG_ReadAngle16 (msg_t *msg);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
extern struct cvar_s *easter_eggs;
|
||||||
|
extern void r_easter_eggs_f (cvar_t *var);
|
||||||
|
|
||||||
extern struct cvar_s *cl_crossx;
|
extern struct cvar_s *cl_crossx;
|
||||||
extern struct cvar_s *cl_crossy;
|
extern struct cvar_s *cl_crossy;
|
||||||
extern struct cvar_s *cl_verstring;
|
extern struct cvar_s *cl_verstring;
|
||||||
|
|
|
@ -42,26 +42,36 @@ typedef enum {
|
||||||
PE_WIZSPIKE,
|
PE_WIZSPIKE,
|
||||||
} particle_effect_t;
|
} particle_effect_t;
|
||||||
|
|
||||||
void R_ParseParticleEffect (void);
|
|
||||||
struct entity_s;
|
struct entity_s;
|
||||||
void R_RocketTrail (struct entity_s *ent);
|
|
||||||
void R_GrenadeTrail (struct entity_s *ent);
|
extern void (*R_RocketTrail) (struct entity_s *ent);
|
||||||
void R_BloodTrail (struct entity_s *ent);
|
extern void (*R_GrenadeTrail) (struct entity_s *ent);
|
||||||
void R_SlightBloodTrail (struct entity_s *ent);
|
extern void (*R_BloodTrail) (struct entity_s *ent);
|
||||||
void R_GreenTrail (struct entity_s *ent);
|
extern void (*R_SlightBloodTrail) (struct entity_s *ent);
|
||||||
void R_FlameTrail (struct entity_s *ent);
|
extern void (*R_WizTrail) (struct entity_s *ent);
|
||||||
void R_VoorTrail (struct entity_s *ent);
|
extern void (*R_FlameTrail) (struct entity_s *ent);
|
||||||
void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
|
extern void (*R_VoorTrail) (struct entity_s *ent);
|
||||||
void R_RunPuffEffect (vec3_t org, particle_effect_t type, byte count);
|
|
||||||
void R_RunSpikeEffect (vec3_t org, particle_effect_t type);
|
extern void (*R_RunParticleEffect) (vec3_t org, vec3_t dir, int color,
|
||||||
|
int count);
|
||||||
|
extern void (*R_BloodPuffEffect) (vec3_t org, int count);
|
||||||
|
extern void (*R_GunshotEffect) (vec3_t org, int count);
|
||||||
|
extern void (*R_LightningBloodEffect) (vec3_t org);
|
||||||
|
extern void (*R_SpikeEffect) (vec3_t org);
|
||||||
|
extern void (*R_KnightSpikeEffect) (vec3_t org);
|
||||||
|
extern void (*R_SuperSpikeEffect) (vec3_t org);
|
||||||
|
extern void (*R_WizSpikeEffect) (vec3_t org);
|
||||||
|
|
||||||
|
extern void (*R_BlobExplosion) (vec3_t org);
|
||||||
|
extern void (*R_ParticleExplosion) (vec3_t org);
|
||||||
|
extern void (*R_ParticleExplosion2) (vec3_t org, int colorStart,
|
||||||
|
int colorLength);
|
||||||
|
extern void (*R_LavaSplash) (vec3_t org);
|
||||||
|
extern void (*R_TeleportSplash) (vec3_t org);
|
||||||
|
|
||||||
void R_DarkFieldParticles (struct entity_s *ent);
|
void R_DarkFieldParticles (struct entity_s *ent);
|
||||||
void R_EntityParticles (struct entity_s *ent);
|
void R_EntityParticles (struct entity_s *ent);
|
||||||
void R_BlobExplosion (vec3_t org);
|
|
||||||
void R_ParticleExplosion (vec3_t org);
|
|
||||||
void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength);
|
|
||||||
void R_LavaSplash (vec3_t org);
|
|
||||||
void R_TeleportSplash (vec3_t org);
|
|
||||||
void R_PushDlights (vec3_t entorigin);
|
void R_PushDlights (vec3_t entorigin);
|
||||||
struct cvar_s;
|
struct cvar_s;
|
||||||
void R_MaxDlightsCheck (struct cvar_s *var);
|
void R_MaxDlightsCheck (struct cvar_s *var);
|
||||||
|
|
|
@ -118,7 +118,7 @@ MSG_WriteString (sizebuf_t *sb, const char *s)
|
||||||
void
|
void
|
||||||
MSG_WriteCoord (sizebuf_t *sb, float f)
|
MSG_WriteCoord (sizebuf_t *sb, float f)
|
||||||
{
|
{
|
||||||
MSG_WriteShort (sb, (unsigned int) (f * 8));
|
MSG_WriteShort (sb, (unsigned int) (f * 8.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -184,7 +184,6 @@ MSG_ReadShort (msg_t *msg)
|
||||||
msg->readcount = msg->message->cursize;
|
msg->readcount = msg->message->cursize;
|
||||||
msg->badread = true;
|
msg->badread = true;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -269,17 +268,25 @@ MSG_ReadString (msg_t *msg)
|
||||||
float
|
float
|
||||||
MSG_ReadCoord (msg_t *msg)
|
MSG_ReadCoord (msg_t *msg)
|
||||||
{
|
{
|
||||||
return MSG_ReadShort (msg) * (1.0 / 8);
|
return MSG_ReadShort (msg) * (1.0 / 8.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MSG_ReadCoord3 (msg_t *msg, vec3_t coord)
|
||||||
|
{
|
||||||
|
coord[0] = MSG_ReadShort (msg) * (1.0 / 8.0);
|
||||||
|
coord[1] = MSG_ReadShort (msg) * (1.0 / 8.0);
|
||||||
|
coord[2] = MSG_ReadShort (msg) * (1.0 / 8.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
MSG_ReadAngle (msg_t *msg)
|
MSG_ReadAngle (msg_t *msg)
|
||||||
{
|
{
|
||||||
return MSG_ReadChar (msg) * (360.0 / 256);
|
return MSG_ReadChar (msg) * (360.0 / 256.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
MSG_ReadAngle16 (msg_t *msg)
|
MSG_ReadAngle16 (msg_t *msg)
|
||||||
{
|
{
|
||||||
return MSG_ReadShort (msg) * (360.0 / 65536);
|
return MSG_ReadShort (msg) * (360.0 / 65536.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,11 +102,6 @@ particle_new_random (ptype_t type, int texnum, vec3_t org, int org_fuzz,
|
||||||
particle_new (type, texnum, porg, scale, pvel, die, color, alpha);
|
particle_new (type, texnum, porg, scale, pvel, die, color, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
R_Particles_Init_Cvars (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
R_ClearParticles (void)
|
R_ClearParticles (void)
|
||||||
{
|
{
|
||||||
|
@ -162,21 +157,20 @@ R_ReadPointFile_f (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_ParticleExplosion (vec3_t org)
|
R_ParticleExplosion_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
if (numparticles >= r_maxparticles)
|
|
||||||
return;
|
|
||||||
/*
|
/*
|
||||||
R_NewExplosion (org);
|
R_NewExplosion (org);
|
||||||
*/
|
*/
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
particle_new_random (pt_smokecloud, part_tex_smoke, org, 4, 30, 8,
|
particle_new_random (pt_smokecloud, part_tex_smoke, org, 4, 30, 8,
|
||||||
r_realtime + 5.0,
|
r_realtime + 5.0, (rand () & 7) + 8,
|
||||||
(rand () & 7) + 8,
|
|
||||||
128 + (rand () & 63));
|
128 + (rand () & 63));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
|
R_ParticleExplosion2_QF (vec3_t org, int colorStart, int colorLength)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int colorMod = 0, j = 512;
|
int colorMod = 0, j = 512;
|
||||||
|
@ -187,16 +181,15 @@ R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
|
||||||
j = r_maxparticles - numparticles;
|
j = r_maxparticles - numparticles;
|
||||||
|
|
||||||
for (i = 0; i < j; i++) {
|
for (i = 0; i < j; i++) {
|
||||||
particle_new_random (pt_blob, part_tex_dot, org, 16, 2, 256,
|
particle_new_random (pt_blob, part_tex_dot, org, 16, 2, 256,
|
||||||
r_realtime + 0.3,
|
r_realtime + 0.3,
|
||||||
colorStart + (colorMod % colorLength),
|
colorStart + (colorMod % colorLength), 255);
|
||||||
255);
|
|
||||||
colorMod++;
|
colorMod++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_BlobExplosion (vec3_t org)
|
R_BlobExplosion_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int j = 1024;
|
int j = 1024;
|
||||||
|
@ -218,28 +211,25 @@ R_BlobExplosion (vec3_t org)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static inline void
|
||||||
R_RunSparkEffect (vec3_t org, int count, int ofuzz)
|
R_RunSparkEffect_QF (vec3_t org, int count, int ofuzz)
|
||||||
{
|
{
|
||||||
int j = count + 1;
|
|
||||||
|
|
||||||
if (numparticles >= r_maxparticles)
|
if (numparticles >= r_maxparticles)
|
||||||
return;
|
return;
|
||||||
else if (numparticles + j >= r_maxparticles)
|
|
||||||
j = r_maxparticles - numparticles;
|
|
||||||
count = j - 1;
|
|
||||||
|
|
||||||
particle_new (pt_smokecloud, part_tex_smoke, org,
|
particle_new (pt_smokecloud, part_tex_smoke, org,
|
||||||
ofuzz * 0.08, vec3_origin, r_realtime + 9,
|
ofuzz * 0.08, vec3_origin, r_realtime + 9,
|
||||||
12 + (rand () & 3), 64 + (rand () & 31));
|
12 + (rand () & 3), 64 + (rand () & 31));
|
||||||
|
|
||||||
|
if (numparticles + count >= r_maxparticles)
|
||||||
|
count = r_maxparticles - numparticles;
|
||||||
while (count--)
|
while (count--)
|
||||||
particle_new_random (pt_fallfadespark, part_tex_dot, org,
|
particle_new_random (pt_fallfadespark, part_tex_dot, org,
|
||||||
ofuzz * 0.75, 0.7, 96, r_realtime + 5,
|
ofuzz * 0.75, 0.7, 96, r_realtime + 5,
|
||||||
ramp[rand () & 7], 255);
|
ramp[rand () & 7], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static void
|
static inline void
|
||||||
R_BloodPuff (vec3_t org, int count)
|
R_BloodPuff_QF (vec3_t org, int count)
|
||||||
{
|
{
|
||||||
if (numparticles >= r_maxparticles)
|
if (numparticles >= r_maxparticles)
|
||||||
return;
|
return;
|
||||||
|
@ -249,54 +239,47 @@ R_BloodPuff (vec3_t org, int count)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunPuffEffect (vec3_t org, particle_effect_t type, byte count)
|
R_BloodPuffEffect_QF (vec3_t org, int count)
|
||||||
{
|
{
|
||||||
// FIXME: Is this test worthwhile?
|
R_BloodPuff_QF (org, count);
|
||||||
if (numparticles >= r_maxparticles)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case PE_GUNSHOT:
|
|
||||||
{
|
|
||||||
int scale = 16;
|
|
||||||
|
|
||||||
if (count > 120)
|
|
||||||
scale = 24;
|
|
||||||
R_RunSparkEffect (org, count / 2, scale);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PE_BLOOD:
|
|
||||||
R_BloodPuff (org, count);
|
|
||||||
break;
|
|
||||||
case PE_LIGHTNINGBLOOD:
|
|
||||||
R_BloodPuff (org, 50);
|
|
||||||
|
|
||||||
if (numparticles >= r_maxparticles)
|
|
||||||
break;
|
|
||||||
particle_new (pt_smokecloud, part_tex_smoke, org,
|
|
||||||
3, vec3_origin, r_realtime + 9,
|
|
||||||
12 + (rand () & 3), 64 + (rand () & 31));
|
|
||||||
count = 7;
|
|
||||||
if (numparticles + count >= r_maxparticles)
|
|
||||||
count = r_maxparticles - numparticles;
|
|
||||||
while (count--)
|
|
||||||
particle_new_random (pt_fallfadespark, part_tex_spark, org,
|
|
||||||
12, 2, 128, r_realtime + 5,
|
|
||||||
244 + (rand () % 3), 255);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
R_GunshotEffect_QF (vec3_t org, int count)
|
||||||
|
{
|
||||||
|
int scale = 16;
|
||||||
|
|
||||||
|
if (count > 120)
|
||||||
|
scale = 24;
|
||||||
|
R_RunSparkEffect_QF (org, count >> 1, scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_LightningBloodEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
int count = 7;
|
||||||
|
|
||||||
|
R_BloodPuff_QF (org, 50);
|
||||||
|
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
particle_new (pt_smokecloud, part_tex_smoke, org, 3, vec3_origin,
|
||||||
|
r_realtime + 9, 12 + (rand () & 3), 64 + (rand () & 31));
|
||||||
|
|
||||||
|
if (numparticles + count >= r_maxparticles)
|
||||||
|
count = r_maxparticles - numparticles;
|
||||||
|
while (count--)
|
||||||
|
particle_new_random (pt_fallfadespark, part_tex_spark, org, 12, 2,
|
||||||
|
128, r_realtime + 5, 244 + (rand () % 3), 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_RunParticleEffect_QF (vec3_t org, vec3_t dir, int color, int count)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (numparticles >= r_maxparticles)
|
if (numparticles >= r_maxparticles)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (numparticles + count >= r_maxparticles)
|
if (numparticles + count >= r_maxparticles)
|
||||||
count = r_maxparticles - numparticles;
|
count = r_maxparticles - numparticles;
|
||||||
|
|
||||||
|
@ -305,34 +288,59 @@ R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
||||||
org[j] += ((rand () & 15) - 8);
|
org[j] += ((rand () & 15) - 8);
|
||||||
}
|
}
|
||||||
particle_new (pt_slowgrav, part_tex_dot, org, 1.5, dir,
|
particle_new (pt_slowgrav, part_tex_dot, org, 1.5, dir,
|
||||||
(r_realtime + 0.1 * (rand () % 5)),
|
r_realtime + 0.1 * (rand () % 5),
|
||||||
(color & ~7) + (rand () & 7), 255);
|
(color & ~7) + (rand () & 7), 255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunSpikeEffect (vec3_t org, particle_effect_t type)
|
R_SpikeEffect_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
switch (type) {
|
R_RunSparkEffect_QF (org, 5, 8);
|
||||||
case PE_SPIKE:
|
|
||||||
R_RunSparkEffect (org, 5, 8);
|
|
||||||
break;
|
|
||||||
case PE_SUPERSPIKE:
|
|
||||||
R_RunSparkEffect (org, 10, 8);
|
|
||||||
break;
|
|
||||||
case PE_KNIGHTSPIKE:
|
|
||||||
R_RunSparkEffect (org, 10, 8);
|
|
||||||
break;
|
|
||||||
case PE_WIZSPIKE:
|
|
||||||
R_RunSparkEffect (org, 15, 16);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_LavaSplash (vec3_t org)
|
R_SuperSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunSparkEffect_QF (org, 10, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_KnightSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
int count = 10;
|
||||||
|
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
particle_new (pt_smokecloud, part_tex_smoke, org, 1, vec3_origin,
|
||||||
|
r_realtime + 9, 234, 64 + (rand () & 31));
|
||||||
|
|
||||||
|
if (numparticles + count >= r_maxparticles)
|
||||||
|
count = r_maxparticles - numparticles;
|
||||||
|
while (count--)
|
||||||
|
particle_new_random (pt_fallfadespark, part_tex_dot, org, 6, 0.7, 96,
|
||||||
|
r_realtime + 5, 234, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_WizSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
int count = 15;
|
||||||
|
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
particle_new (pt_smokecloud, part_tex_smoke, org, 2, vec3_origin,
|
||||||
|
r_realtime + 9, 52 + (rand () & 3), 64 + (rand () & 31));
|
||||||
|
|
||||||
|
if (numparticles + count >= r_maxparticles)
|
||||||
|
count = r_maxparticles - numparticles;
|
||||||
|
while (count--)
|
||||||
|
particle_new_random (pt_fallfadespark, part_tex_dot, org, 12, 0.7, 96,
|
||||||
|
r_realtime + 5, 52 + (rand () & 3), 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_LavaSplash_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
float vel;
|
float vel;
|
||||||
int rnd, i, j;
|
int rnd, i, j;
|
||||||
|
@ -361,14 +369,14 @@ R_LavaSplash (vec3_t org)
|
||||||
vel = 50 + (rnd & 63);
|
vel = 50 + (rnd & 63);
|
||||||
VectorScale (dir, vel, pvel);
|
VectorScale (dir, vel, pvel);
|
||||||
particle_new (pt_grav, part_tex_dot, porg, 3, pvel,
|
particle_new (pt_grav, part_tex_dot, porg, 3, pvel,
|
||||||
(r_realtime + 2 + ((rnd >> 7) & 31) * 0.02),
|
r_realtime + 2 + ((rnd >> 7) & 31) * 0.02,
|
||||||
(224 + ((rnd >> 12) & 7)), 193);
|
224 + ((rnd >> 12) & 7), 193);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_TeleportSplash (vec3_t org)
|
R_TeleportSplash_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
float vel;
|
float vel;
|
||||||
int rnd, i, j, k;
|
int rnd, i, j, k;
|
||||||
|
@ -405,7 +413,7 @@ R_TeleportSplash (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RocketTrail (entity_t *ent)
|
R_RocketTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
||||||
float len = 0.0;
|
float len = 0.0;
|
||||||
|
@ -441,7 +449,7 @@ R_RocketTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_GrenadeTrail (entity_t *ent)
|
R_GrenadeTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
||||||
float len = 0.0;
|
float len = 0.0;
|
||||||
|
@ -476,7 +484,7 @@ R_GrenadeTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_BloodTrail (entity_t *ent)
|
R_BloodTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
||||||
float len = 0.0;
|
float len = 0.0;
|
||||||
|
@ -519,7 +527,7 @@ R_BloodTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_SlightBloodTrail (entity_t *ent)
|
R_SlightBloodTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
||||||
float len = 0;
|
float len = 0;
|
||||||
|
@ -562,7 +570,7 @@ R_SlightBloodTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_GreenTrail (entity_t *ent)
|
R_WizTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float maxlen, origlen, percent;
|
float maxlen, origlen, percent;
|
||||||
float dist = 3.0, len = 0.0;
|
float dist = 3.0, len = 0.0;
|
||||||
|
@ -602,7 +610,7 @@ R_GreenTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_FlameTrail (entity_t *ent)
|
R_FlameTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float maxlen, origlen, percent;
|
float maxlen, origlen, percent;
|
||||||
float dist = 3.0, len = 0.0;
|
float dist = 3.0, len = 0.0;
|
||||||
|
@ -642,7 +650,7 @@ R_FlameTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_VoorTrail (entity_t *ent)
|
R_VoorTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float maxlen, origlen, percent;
|
float maxlen, origlen, percent;
|
||||||
float dist = 3.0, len = 0.0;
|
float dist = 3.0, len = 0.0;
|
||||||
|
@ -673,6 +681,112 @@ R_VoorTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_ParticleExplosion_EE (vec3_t org)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
R_NewExplosion (org);
|
||||||
|
*/
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
particle_new_random (pt_smokecloud, part_tex_smoke, org, 4, 30, 8,
|
||||||
|
r_realtime + 5.0, rand () & 255,
|
||||||
|
128 + (rand () & 63));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_RocketTrail_EE (entity_t *ent)
|
||||||
|
{
|
||||||
|
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
||||||
|
float len = 0.0;
|
||||||
|
vec3_t subtract, vec;
|
||||||
|
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
|
||||||
|
VectorSubtract (ent->origin, ent->old_origin, vec);
|
||||||
|
maxlen = VectorNormalize (vec);
|
||||||
|
origlen = r_frametime / maxlen;
|
||||||
|
|
||||||
|
pscale = 1.5 + qfrandom (1.5);
|
||||||
|
|
||||||
|
while (len < maxlen) {
|
||||||
|
pscalenext = 1.5 + qfrandom (1.5);
|
||||||
|
dist = (pscale + pscalenext) * 3.0;
|
||||||
|
|
||||||
|
VectorScale (vec, min(dist, len), subtract);
|
||||||
|
VectorAdd (ent->old_origin, subtract, ent->old_origin);
|
||||||
|
percent = len * origlen;
|
||||||
|
|
||||||
|
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||||
|
pscale + percent * 4.0, vec3_origin,
|
||||||
|
r_realtime + 2.0 - percent * 2.0,
|
||||||
|
rand () & 255,
|
||||||
|
128 + (rand () & 31) - percent * 100.0);
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
break;
|
||||||
|
len += dist;
|
||||||
|
pscale = pscalenext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_GrenadeTrail_EE (entity_t *ent)
|
||||||
|
{
|
||||||
|
float dist, maxlen, origlen, percent, pscale, pscalenext;
|
||||||
|
float len = 0.0;
|
||||||
|
vec3_t subtract, vec;
|
||||||
|
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
|
||||||
|
VectorSubtract (ent->origin, ent->old_origin, vec);
|
||||||
|
maxlen = VectorNormalize (vec);
|
||||||
|
origlen = r_frametime / maxlen;
|
||||||
|
pscale = 6.0 + qfrandom (7.0);
|
||||||
|
|
||||||
|
while (len < maxlen) {
|
||||||
|
pscalenext = 6.0 + qfrandom (7.0);
|
||||||
|
dist = (pscale + pscalenext) * 2.0;
|
||||||
|
|
||||||
|
VectorScale (vec, min(dist, len), subtract);
|
||||||
|
VectorAdd (ent->old_origin, subtract, ent->old_origin);
|
||||||
|
percent = len * origlen;
|
||||||
|
|
||||||
|
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||||
|
pscale + percent * 4.0, vec3_origin,
|
||||||
|
r_realtime + 2.0 - percent * 2.0,
|
||||||
|
rand () & 255,
|
||||||
|
160 + (rand () & 31) - percent * 100.0);
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
break;
|
||||||
|
len += dist;
|
||||||
|
pscale = pscalenext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_ParticleExplosion_ID (vec3_t org)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int j = 1024;
|
||||||
|
ptype_t ptype;
|
||||||
|
|
||||||
|
if (numparticles >= r_maxparticles)
|
||||||
|
return;
|
||||||
|
else if (numparticles + j >= r_maxparticles)
|
||||||
|
j = r_maxparticles - numparticles;
|
||||||
|
|
||||||
|
for (i = 0; i < j; i++) {
|
||||||
|
if (i & 1)
|
||||||
|
ptype = pt_explode;
|
||||||
|
else
|
||||||
|
ptype = pt_explode2;
|
||||||
|
particle_new_random (ptype, part_tex_dot, org, 16, 1.5, 256,
|
||||||
|
r_realtime + 5.0, (rand () & 7) + 8, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_DrawParticles (void)
|
R_DrawParticles (void)
|
||||||
{
|
{
|
||||||
|
@ -700,18 +814,18 @@ R_DrawParticles (void)
|
||||||
varray[3].texcoord[0] = 1;
|
varray[3].texcoord[0] = 1;
|
||||||
varray[3].texcoord[1] = 1;
|
varray[3].texcoord[1] = 1;
|
||||||
|
|
||||||
grav = (fast_grav = r_frametime * 800) * 0.05;
|
grav = (fast_grav = r_frametime * 800.0) * 0.05;
|
||||||
dvel = bloodcloud_scale = smoke_scale = r_frametime * 4;
|
dvel = bloodcloud_scale = smoke_scale = r_frametime * 4.0;
|
||||||
smoke_alpha = r_frametime * 100;
|
smoke_alpha = r_frametime * 100.0;
|
||||||
smokecloud_alpha = r_frametime * 140;
|
smokecloud_alpha = r_frametime * 140.0;
|
||||||
smokecloud_scale = r_frametime * 50;
|
smokecloud_scale = r_frametime * 50.0;
|
||||||
smokecloud_org = r_frametime * 30;
|
smokecloud_org = r_frametime * 30.0;
|
||||||
bloodcloud_alpha = r_frametime * 65;
|
bloodcloud_alpha = r_frametime * 65.0;
|
||||||
fallfadespark_alpha = r_frametime * 256;
|
fallfadespark_alpha = r_frametime * 256.0;
|
||||||
fire_alpha = r_frametime * 32;
|
fire_alpha = r_frametime * 32.0;
|
||||||
fire_scale = r_frametime * 2;
|
fire_scale = r_frametime * 2.0;
|
||||||
|
|
||||||
minparticledist = DotProduct (r_refdef.vieworg, vpn) + 32.0f;
|
minparticledist = DotProduct (r_refdef.vieworg, vpn) + 32.0;
|
||||||
|
|
||||||
activeparticles = 0;
|
activeparticles = 0;
|
||||||
maxparticle = -1;
|
maxparticle = -1;
|
||||||
|
@ -728,20 +842,20 @@ R_DrawParticles (void)
|
||||||
varray[0].color[2] = at[2];
|
varray[0].color[2] = at[2];
|
||||||
varray[0].color[3] = part->alpha;
|
varray[0].color[3] = part->alpha;
|
||||||
|
|
||||||
memcpy(varray[1].color, varray[0].color, sizeof(varray[0].color));
|
memcpy (varray[1].color, varray[0].color, sizeof(varray[0].color));
|
||||||
memcpy(varray[2].color, varray[0].color, sizeof(varray[0].color));
|
memcpy (varray[2].color, varray[0].color, sizeof(varray[0].color));
|
||||||
memcpy(varray[3].color, varray[0].color, sizeof(varray[0].color));
|
memcpy (varray[3].color, varray[0].color, sizeof(varray[0].color));
|
||||||
|
|
||||||
scale = part->scale;
|
scale = part->scale;
|
||||||
|
|
||||||
VectorScale (vup, scale, up_scale);
|
VectorScale (vup, scale, up_scale);
|
||||||
VectorScale (vright, scale, right_scale);
|
VectorScale (vright, scale, right_scale);
|
||||||
|
|
||||||
VectorAdd (right_scale, up_scale, up_right_scale);
|
VectorAdd (right_scale, up_scale, up_right_scale);
|
||||||
VectorSubtract (right_scale, up_scale, down_right_scale);
|
VectorSubtract (right_scale, up_scale, down_right_scale);
|
||||||
|
|
||||||
VectorAdd (part->org, up_right_scale, varray[0].vertex);
|
VectorAdd (part->org, up_right_scale, varray[0].vertex);
|
||||||
VectorAdd (part->org, down_right_scale, varray[1].vertex);
|
VectorAdd (part->org, down_right_scale, varray[1].vertex);
|
||||||
VectorSubtract (part->org, up_right_scale, varray[2].vertex);
|
VectorSubtract (part->org, up_right_scale, varray[2].vertex);
|
||||||
VectorSubtract (part->org, down_right_scale, varray[3].vertex);
|
VectorSubtract (part->org, down_right_scale, varray[3].vertex);
|
||||||
|
|
||||||
|
@ -773,8 +887,7 @@ R_DrawParticles (void)
|
||||||
// part->org[2] += smokecloud_org;
|
// part->org[2] += smokecloud_org;
|
||||||
break;
|
break;
|
||||||
case pt_smokecloud:
|
case pt_smokecloud:
|
||||||
if ((part->alpha -= smokecloud_alpha) < 1)
|
if ((part->alpha -= smokecloud_alpha) < 1) {
|
||||||
{
|
|
||||||
part->die = -1;
|
part->die = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -782,8 +895,7 @@ R_DrawParticles (void)
|
||||||
part->org[2] += smokecloud_org;
|
part->org[2] += smokecloud_org;
|
||||||
break;
|
break;
|
||||||
case pt_bloodcloud:
|
case pt_bloodcloud:
|
||||||
if ((part->alpha -= bloodcloud_alpha) < 1)
|
if ((part->alpha -= bloodcloud_alpha) < 1) {
|
||||||
{
|
|
||||||
part->die = -1;
|
part->die = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -808,8 +920,7 @@ R_DrawParticles (void)
|
||||||
// to ensure compactor below operates properly in all cases)
|
// to ensure compactor below operates properly in all cases)
|
||||||
if (part->die < r_realtime)
|
if (part->die < r_realtime)
|
||||||
freeparticles[j++] = part;
|
freeparticles[j++] = part;
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
maxparticle = k;
|
maxparticle = k;
|
||||||
activeparticles++;
|
activeparticles++;
|
||||||
}
|
}
|
||||||
|
@ -818,7 +929,7 @@ R_DrawParticles (void)
|
||||||
while (maxparticle >= activeparticles) {
|
while (maxparticle >= activeparticles) {
|
||||||
*freeparticles[k++] = particles[maxparticle--];
|
*freeparticles[k++] = particles[maxparticle--];
|
||||||
while (maxparticle >= activeparticles &&
|
while (maxparticle >= activeparticles &&
|
||||||
particles[maxparticle].die <= r_realtime)
|
particles[maxparticle].die <= r_realtime)
|
||||||
maxparticle--;
|
maxparticle--;
|
||||||
}
|
}
|
||||||
numparticles = activeparticles;
|
numparticles = activeparticles;
|
||||||
|
@ -826,3 +937,53 @@ R_DrawParticles (void)
|
||||||
qfglColor3ubv (color_white);
|
qfglColor3ubv (color_white);
|
||||||
qfglDepthMask (GL_TRUE);
|
qfglDepthMask (GL_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
r_easter_eggs_f (cvar_t *var)
|
||||||
|
{
|
||||||
|
if (easter_eggs) {
|
||||||
|
if (easter_eggs->int_val) {
|
||||||
|
R_ParticleExplosion = R_ParticleExplosion_EE;
|
||||||
|
R_RocketTrail = R_RocketTrail_EE;
|
||||||
|
R_GrenadeTrail = R_GrenadeTrail_EE;
|
||||||
|
} else {
|
||||||
|
R_ParticleExplosion = R_ParticleExplosion_QF;
|
||||||
|
R_RocketTrail = R_RocketTrail_QF;
|
||||||
|
R_GrenadeTrail = R_GrenadeTrail_QF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_ParticleFunctionInit (void)
|
||||||
|
{
|
||||||
|
R_BlobExplosion = R_BlobExplosion_QF;
|
||||||
|
R_ParticleExplosion = R_ParticleExplosion_QF;
|
||||||
|
R_ParticleExplosion2 = R_ParticleExplosion2_QF;
|
||||||
|
R_LavaSplash = R_LavaSplash_QF;
|
||||||
|
R_TeleportSplash = R_TeleportSplash_QF;
|
||||||
|
|
||||||
|
R_BloodPuffEffect = R_BloodPuffEffect_QF;
|
||||||
|
R_GunshotEffect = R_GunshotEffect_QF;
|
||||||
|
R_LightningBloodEffect = R_LightningBloodEffect_QF;
|
||||||
|
|
||||||
|
R_RunParticleEffect = R_RunParticleEffect_QF;
|
||||||
|
R_SpikeEffect = R_SpikeEffect_QF;
|
||||||
|
R_SuperSpikeEffect = R_SuperSpikeEffect_QF;
|
||||||
|
R_KnightSpikeEffect = R_KnightSpikeEffect_QF;
|
||||||
|
R_WizSpikeEffect = R_WizSpikeEffect_QF;
|
||||||
|
|
||||||
|
R_RocketTrail = R_RocketTrail_QF;
|
||||||
|
R_GrenadeTrail = R_GrenadeTrail_QF;
|
||||||
|
R_BloodTrail = R_BloodTrail_QF;
|
||||||
|
R_SlightBloodTrail = R_SlightBloodTrail_QF;
|
||||||
|
R_WizTrail = R_WizTrail_QF;
|
||||||
|
R_FlameTrail = R_FlameTrail_QF;
|
||||||
|
R_VoorTrail = R_VoorTrail_QF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_Particles_Init_Cvars (void)
|
||||||
|
{
|
||||||
|
R_ParticleFunctionInit ();
|
||||||
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ R_ShowNearestLoc (void)
|
||||||
dl->color[2] = 0;
|
dl->color[2] = 0;
|
||||||
|
|
||||||
VectorCopy (nearloc->loc, trueloc);
|
VectorCopy (nearloc->loc, trueloc);
|
||||||
R_RunSpikeEffect (trueloc, 7);
|
(*R_WizSpikeEffect) (trueloc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,8 @@ R_Init (void)
|
||||||
qfglEnableClientState (GL_VERTEX_ARRAY);
|
qfglEnableClientState (GL_VERTEX_ARRAY);
|
||||||
qfglEnableClientState (GL_TEXTURE_COORD_ARRAY);
|
qfglEnableClientState (GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
// qfglInterleavedArrays(GL_T2F_C4F_N3F_V3F, 0, varray);
|
// qfglInterleavedArrays (GL_T2F_C4UB_N3F_V3F, 0, varray); // Models w/normals
|
||||||
|
// qfglInterleavedArrays (GL_T2F_C4UB_V3F, 0, varray); // Polys w/o normals
|
||||||
qfglTexCoordPointer (2, GL_FLOAT, sizeof(varray[0]), varray[0].texcoord);
|
qfglTexCoordPointer (2, GL_FLOAT, sizeof(varray[0]), varray[0].texcoord);
|
||||||
qfglColorPointer (4, GL_UNSIGNED_BYTE, sizeof(varray[0]), varray[0].color);
|
qfglColorPointer (4, GL_UNSIGNED_BYTE, sizeof(varray[0]), varray[0].color);
|
||||||
qfglVertexPointer (3, GL_FLOAT, sizeof(varray[0]), varray[0].vertex);
|
qfglVertexPointer (3, GL_FLOAT, sizeof(varray[0]), varray[0].vertex);
|
||||||
|
|
|
@ -41,6 +41,8 @@ static const char rcsid[] =
|
||||||
#include "r_cvar.h"
|
#include "r_cvar.h"
|
||||||
#include "r_dynamic.h"
|
#include "r_dynamic.h"
|
||||||
|
|
||||||
|
cvar_t *easter_eggs;
|
||||||
|
|
||||||
cvar_t *cl_crossx;
|
cvar_t *cl_crossx;
|
||||||
cvar_t *cl_crossy;
|
cvar_t *cl_crossy;
|
||||||
cvar_t *cl_verstring;
|
cvar_t *cl_verstring;
|
||||||
|
@ -143,6 +145,8 @@ r_particles_max_f (cvar_t *var)
|
||||||
void
|
void
|
||||||
R_Init_Cvars (void)
|
R_Init_Cvars (void)
|
||||||
{
|
{
|
||||||
|
easter_eggs = Cvar_Get ("easter_eggs", "0", CVAR_NONE, r_easter_eggs_f,
|
||||||
|
"Enables easter eggs.");
|
||||||
|
|
||||||
cl_crossx = Cvar_Get ("cl_crossx", "0", CVAR_ARCHIVE, NULL,
|
cl_crossx = Cvar_Get ("cl_crossx", "0", CVAR_ARCHIVE, NULL,
|
||||||
"Sets the position of the crosshair on the X-axis.");
|
"Sets the position of the crosshair on the X-axis.");
|
||||||
|
|
|
@ -44,6 +44,27 @@ unsigned int r_maxparticles, numparticles;
|
||||||
particle_t *active_particles, *free_particles, *particles, **freeparticles;
|
particle_t *active_particles, *free_particles, *particles, **freeparticles;
|
||||||
vec3_t r_pright, r_pup, r_ppn;
|
vec3_t r_pright, r_pup, r_ppn;
|
||||||
|
|
||||||
|
void (*R_RocketTrail) (struct entity_s *ent);
|
||||||
|
void (*R_GrenadeTrail) (struct entity_s *ent);
|
||||||
|
void (*R_BloodTrail) (struct entity_s *ent);
|
||||||
|
void (*R_SlightBloodTrail) (struct entity_s *ent);
|
||||||
|
void (*R_WizTrail) (struct entity_s *ent);
|
||||||
|
void (*R_FlameTrail) (struct entity_s *ent);
|
||||||
|
void (*R_VoorTrail) (struct entity_s *ent);
|
||||||
|
void (*R_RunParticleEffect) (vec3_t org, vec3_t dir, int color, int count);
|
||||||
|
void (*R_BloodPuffEffect) (vec3_t org, int count);
|
||||||
|
void (*R_GunshotEffect) (vec3_t org, int count);
|
||||||
|
void (*R_LightningBloodEffect) (vec3_t org);
|
||||||
|
void (*R_SpikeEffect) (vec3_t org);
|
||||||
|
void (*R_KnightSpikeEffect) (vec3_t org);
|
||||||
|
void (*R_SuperSpikeEffect) (vec3_t org);
|
||||||
|
void (*R_WizSpikeEffect) (vec3_t org);
|
||||||
|
void (*R_BlobExplosion) (vec3_t org);
|
||||||
|
void (*R_ParticleExplosion) (vec3_t org);
|
||||||
|
void (*R_ParticleExplosion2) (vec3_t org, int colorStart, int colorLength);
|
||||||
|
void (*R_LavaSplash) (vec3_t org);
|
||||||
|
void (*R_TeleportSplash) (vec3_t org);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
R_MaxParticlesCheck
|
R_MaxParticlesCheck
|
||||||
|
|
|
@ -50,11 +50,6 @@ int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
R_Particles_Init_Cvars (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
R_ClearParticles (void)
|
R_ClearParticles (void)
|
||||||
{
|
{
|
||||||
|
@ -119,49 +114,7 @@ R_ReadPointFile_f (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunSpikeEffect (vec3_t pos, particle_effect_t type)
|
R_ParticleExplosion_QF (vec3_t org)
|
||||||
{
|
|
||||||
switch (type) {
|
|
||||||
case PE_WIZSPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 20, 30);
|
|
||||||
break;
|
|
||||||
case PE_KNIGHTSPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 226, 20);
|
|
||||||
break;
|
|
||||||
case PE_SPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 0, 10);
|
|
||||||
break;
|
|
||||||
case PE_SUPERSPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 0, 20);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
R_RunPuffEffect (vec3_t pos, particle_effect_t type, byte cnt)
|
|
||||||
{
|
|
||||||
if (!r_particles->int_val)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case PE_GUNSHOT:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 0, cnt);
|
|
||||||
break;
|
|
||||||
case PE_BLOOD:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 73, cnt);
|
|
||||||
break;
|
|
||||||
case PE_LIGHTNINGBLOOD:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 225, 50);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
R_ParticleExplosion (vec3_t org)
|
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -197,7 +150,7 @@ R_ParticleExplosion (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
|
R_ParticleExplosion2_QF (vec3_t org, int colorStart, int colorLength)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -226,7 +179,7 @@ R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_BlobExplosion (vec3_t org)
|
R_BlobExplosion_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -263,7 +216,7 @@ R_BlobExplosion (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
R_RunParticleEffect_QF (vec3_t org, vec3_t dir, int color, int count)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -290,7 +243,49 @@ R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_LavaSplash (vec3_t org)
|
R_SpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 0, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_SuperSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect (org, vec3_origin, 0, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_KnightSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 226, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_WizSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 20, 30);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_BloodPuffEffect_QF (vec3_t org, int count)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 73, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_GunshotEffect_QF (vec3_t org, int count)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 0, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_LightningBloodEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 225, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_LavaSplash_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -329,7 +324,7 @@ R_LavaSplash (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_TeleportSplash (vec3_t org)
|
R_TeleportSplash_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -368,7 +363,7 @@ R_TeleportSplash (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RocketTrail (entity_t *ent)
|
R_RocketTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -405,7 +400,7 @@ R_RocketTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_GrenadeTrail (entity_t *ent)
|
R_GrenadeTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -442,7 +437,7 @@ R_GrenadeTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_BloodTrail (entity_t *ent)
|
R_BloodTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -479,7 +474,7 @@ R_BloodTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_SlightBloodTrail (entity_t *ent)
|
R_SlightBloodTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -515,7 +510,7 @@ R_SlightBloodTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_GreenTrail (entity_t *ent)
|
R_WizTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -552,7 +547,7 @@ R_GreenTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_FlameTrail (entity_t *ent)
|
R_FlameTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -598,7 +593,7 @@ R_FlameTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_VoorTrail (entity_t *ent)
|
R_VoorTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -726,3 +721,42 @@ R_DrawParticles (void)
|
||||||
}
|
}
|
||||||
D_EndParticles ();
|
D_EndParticles ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
r_easter_eggs_f (cvar_t *var)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_ParticleFunctionInit (void)
|
||||||
|
{
|
||||||
|
R_BlobExplosion = R_BlobExplosion_QF;
|
||||||
|
R_ParticleExplosion = R_ParticleExplosion_QF;
|
||||||
|
R_ParticleExplosion2 = R_ParticleExplosion2_QF;
|
||||||
|
R_LavaSplash = R_LavaSplash_QF;
|
||||||
|
R_TeleportSplash = R_TeleportSplash_QF;
|
||||||
|
|
||||||
|
R_BloodPuffEffect = R_BloodPuffEffect_QF;
|
||||||
|
R_GunshotEffect = R_GunshotEffect_QF;
|
||||||
|
R_LightningBloodEffect = R_LightningBloodEffect_QF;
|
||||||
|
|
||||||
|
R_RunParticleEffect = R_RunParticleEffect_QF;
|
||||||
|
R_SpikeEffect = R_SpikeEffect_QF;
|
||||||
|
R_SuperSpikeEffect = R_SuperSpikeEffect_QF;
|
||||||
|
R_KnightSpikeEffect = R_KnightSpikeEffect_QF;
|
||||||
|
R_WizSpikeEffect = R_WizSpikeEffect_QF;
|
||||||
|
|
||||||
|
R_RocketTrail = R_RocketTrail_QF;
|
||||||
|
R_GrenadeTrail = R_GrenadeTrail_QF;
|
||||||
|
R_BloodTrail = R_BloodTrail_QF;
|
||||||
|
R_SlightBloodTrail = R_SlightBloodTrail_QF;
|
||||||
|
R_WizTrail = R_WizTrail_QF;
|
||||||
|
R_FlameTrail = R_FlameTrail_QF;
|
||||||
|
R_VoorTrail = R_VoorTrail_QF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_Particles_Init_Cvars (void)
|
||||||
|
{
|
||||||
|
R_ParticleFunctionInit ();
|
||||||
|
}
|
||||||
|
|
|
@ -49,12 +49,6 @@ int ramp2[8] = { 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66 };
|
||||||
int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
R_Particles_Init_Cvars (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
R_ClearParticles (void)
|
R_ClearParticles (void)
|
||||||
{
|
{
|
||||||
|
@ -119,49 +113,7 @@ R_ReadPointFile_f (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunSpikeEffect (vec3_t pos, particle_effect_t type)
|
R_ParticleExplosion_QF (vec3_t org)
|
||||||
{
|
|
||||||
switch (type) {
|
|
||||||
case PE_WIZSPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 20, 30);
|
|
||||||
break;
|
|
||||||
case PE_KNIGHTSPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 226, 20);
|
|
||||||
break;
|
|
||||||
case PE_SPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 0, 10);
|
|
||||||
break;
|
|
||||||
case PE_SUPERSPIKE:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 0, 20);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
R_RunPuffEffect (vec3_t pos, particle_effect_t type, byte cnt)
|
|
||||||
{
|
|
||||||
if (!r_particles->int_val)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case PE_GUNSHOT:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 0, cnt);
|
|
||||||
break;
|
|
||||||
case PE_BLOOD:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 73, cnt);
|
|
||||||
break;
|
|
||||||
case PE_LIGHTNINGBLOOD:
|
|
||||||
R_RunParticleEffect (pos, vec3_origin, 225, 50);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
R_ParticleExplosion (vec3_t org)
|
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -197,7 +149,7 @@ R_ParticleExplosion (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
|
R_ParticleExplosion2_QF (vec3_t org, int colorStart, int colorLength)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -226,7 +178,7 @@ R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_BlobExplosion (vec3_t org)
|
R_BlobExplosion_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -263,34 +215,7 @@ R_BlobExplosion (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
R_LavaSplash_QF (vec3_t org)
|
||||||
{
|
|
||||||
int i, j;
|
|
||||||
particle_t *p;
|
|
||||||
|
|
||||||
if (!r_particles->int_val)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
|
||||||
if (!free_particles)
|
|
||||||
return;
|
|
||||||
p = free_particles;
|
|
||||||
free_particles = p->next;
|
|
||||||
p->next = active_particles;
|
|
||||||
active_particles = p;
|
|
||||||
|
|
||||||
p->die = r_realtime + 0.1 * (rand () % 5);
|
|
||||||
p->color = (color & ~7) + (rand () & 7);
|
|
||||||
p->type = pt_slowgrav;
|
|
||||||
for (j = 0; j < 3; j++) {
|
|
||||||
p->org[j] = org[j] + ((rand () & 15) - 8);
|
|
||||||
p->vel[j] = dir[j]; // + (rand()%300)-150;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
R_LavaSplash (vec3_t org)
|
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -329,7 +254,7 @@ R_LavaSplash (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_TeleportSplash (vec3_t org)
|
R_TeleportSplash_QF (vec3_t org)
|
||||||
{
|
{
|
||||||
float vel;
|
float vel;
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
@ -368,7 +293,76 @@ R_TeleportSplash (vec3_t org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_RocketTrail (entity_t *ent)
|
R_RunParticleEffect_QF (vec3_t org, vec3_t dir, int color, int count)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
particle_t *p;
|
||||||
|
|
||||||
|
if (!r_particles->int_val)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
if (!free_particles)
|
||||||
|
return;
|
||||||
|
p = free_particles;
|
||||||
|
free_particles = p->next;
|
||||||
|
p->next = active_particles;
|
||||||
|
active_particles = p;
|
||||||
|
|
||||||
|
p->die = r_realtime + 0.1 * (rand () % 5);
|
||||||
|
p->color = (color & ~7) + (rand () & 7);
|
||||||
|
p->type = pt_slowgrav;
|
||||||
|
for (j = 0; j < 3; j++) {
|
||||||
|
p->org[j] = org[j] + ((rand () & 15) - 8);
|
||||||
|
p->vel[j] = dir[j]; // + (rand()%300)-150;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_SpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 0, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_SuperSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect (org, vec3_origin, 0, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_KnightSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 226, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_WizSpikeEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 20, 30);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_BloodPuffEffect_QF (vec3_t org, int count)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 73, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_GunshotEffect_QF (vec3_t org, int count)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 0, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_LightningBloodEffect_QF (vec3_t org)
|
||||||
|
{
|
||||||
|
R_RunParticleEffect_QF (org, vec3_origin, 225, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_RocketTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -405,7 +399,7 @@ R_RocketTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_GrenadeTrail (entity_t *ent)
|
R_GrenadeTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -442,7 +436,7 @@ R_GrenadeTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_BloodTrail (entity_t *ent)
|
R_BloodTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -479,7 +473,7 @@ R_BloodTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_SlightBloodTrail (entity_t *ent)
|
R_SlightBloodTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -515,7 +509,7 @@ R_SlightBloodTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_GreenTrail (entity_t *ent)
|
R_WizTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -552,7 +546,7 @@ R_GreenTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_FlameTrail (entity_t *ent)
|
R_FlameTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
@ -598,7 +592,7 @@ R_FlameTrail (entity_t *ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
R_VoorTrail (entity_t *ent)
|
R_VoorTrail_QF (entity_t *ent)
|
||||||
{
|
{
|
||||||
float len;
|
float len;
|
||||||
int j;
|
int j;
|
||||||
|
@ -727,3 +721,42 @@ R_DrawParticles (void)
|
||||||
}
|
}
|
||||||
D_EndParticles ();
|
D_EndParticles ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
r_easter_eggs_f (cvar_t *var)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_ParticleFunctionInit (void)
|
||||||
|
{
|
||||||
|
R_BlobExplosion = R_BlobExplosion_QF;
|
||||||
|
R_ParticleExplosion = R_ParticleExplosion_QF;
|
||||||
|
R_ParticleExplosion2 = R_ParticleExplosion2_QF;
|
||||||
|
R_LavaSplash = R_LavaSplash_QF;
|
||||||
|
R_TeleportSplash = R_TeleportSplash_QF;
|
||||||
|
|
||||||
|
R_BloodPuffEffect = R_BloodPuffEffect_QF;
|
||||||
|
R_GunshotEffect = R_GunshotEffect_QF;
|
||||||
|
R_LightningBloodEffect = R_LightningBloodEffect_QF;
|
||||||
|
|
||||||
|
R_RunParticleEffect = R_RunParticleEffect_QF;
|
||||||
|
R_SpikeEffect = R_SpikeEffect_QF;
|
||||||
|
R_SuperSpikeEffect = R_SuperSpikeEffect_QF;
|
||||||
|
R_KnightSpikeEffect = R_KnightSpikeEffect_QF;
|
||||||
|
R_WizSpikeEffect = R_WizSpikeEffect_QF;
|
||||||
|
|
||||||
|
R_RocketTrail = R_RocketTrail_QF;
|
||||||
|
R_GrenadeTrail = R_GrenadeTrail_QF;
|
||||||
|
R_BloodTrail = R_BloodTrail_QF;
|
||||||
|
R_SlightBloodTrail = R_SlightBloodTrail_QF;
|
||||||
|
R_WizTrail = R_WizTrail_QF;
|
||||||
|
R_FlameTrail = R_FlameTrail_QF;
|
||||||
|
R_VoorTrail = R_VoorTrail_QF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
R_Particles_Init_Cvars (void)
|
||||||
|
{
|
||||||
|
R_ParticleFunctionInit ();
|
||||||
|
}
|
||||||
|
|
|
@ -621,7 +621,7 @@ CL_RelinkEntities (void)
|
||||||
else if (ent->model->flags & EF_ZOMGIB)
|
else if (ent->model->flags & EF_ZOMGIB)
|
||||||
R_SlightBloodTrail (ent);
|
R_SlightBloodTrail (ent);
|
||||||
else if (ent->model->flags & EF_TRACER)
|
else if (ent->model->flags & EF_TRACER)
|
||||||
R_GreenTrail (ent);
|
R_WizTrail (ent);
|
||||||
else if (ent->model->flags & EF_TRACER2)
|
else if (ent->model->flags & EF_TRACER2)
|
||||||
R_FlameTrail (ent);
|
R_FlameTrail (ent);
|
||||||
else if (ent->model->flags & EF_TRACER3)
|
else if (ent->model->flags & EF_TRACER3)
|
||||||
|
|
|
@ -127,7 +127,7 @@ void
|
||||||
CL_ParseStartSoundPacket (void)
|
CL_ParseStartSoundPacket (void)
|
||||||
{
|
{
|
||||||
float attenuation;
|
float attenuation;
|
||||||
int channel, ent, field_mask, sound_num, volume, i;
|
int channel, ent, field_mask, sound_num, volume;
|
||||||
vec3_t pos;
|
vec3_t pos;
|
||||||
|
|
||||||
field_mask = MSG_ReadByte (net_message);
|
field_mask = MSG_ReadByte (net_message);
|
||||||
|
@ -151,8 +151,7 @@ CL_ParseStartSoundPacket (void)
|
||||||
if (ent > MAX_EDICTS)
|
if (ent > MAX_EDICTS)
|
||||||
Host_Error ("CL_ParseStartSoundPacket: ent = %i", ent);
|
Host_Error ("CL_ParseStartSoundPacket: ent = %i", ent);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[i] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
S_StartSound (ent, channel, cl.sound_precache[sound_num], pos,
|
S_StartSound (ent, channel, cl.sound_precache[sound_num], pos,
|
||||||
volume / 255.0, attenuation);
|
volume / 255.0, attenuation);
|
||||||
|
@ -644,11 +643,10 @@ CL_ParseStatic (void)
|
||||||
void
|
void
|
||||||
CL_ParseStaticSound (void)
|
CL_ParseStaticSound (void)
|
||||||
{
|
{
|
||||||
int sound_num, vol, atten, i;
|
int sound_num, vol, atten;
|
||||||
vec3_t org;
|
vec3_t org;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
MSG_ReadCoord3 (net_message, org);
|
||||||
org[i] = MSG_ReadCoord (net_message);
|
|
||||||
sound_num = MSG_ReadByte (net_message);
|
sound_num = MSG_ReadByte (net_message);
|
||||||
vol = MSG_ReadByte (net_message);
|
vol = MSG_ReadByte (net_message);
|
||||||
atten = MSG_ReadByte (net_message);
|
atten = MSG_ReadByte (net_message);
|
||||||
|
|
|
@ -186,13 +186,8 @@ CL_ParseBeam (model_t *m)
|
||||||
|
|
||||||
ent = MSG_ReadShort (net_message);
|
ent = MSG_ReadShort (net_message);
|
||||||
|
|
||||||
start[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, start);
|
||||||
start[1] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, end);
|
||||||
start[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
end[0] = MSG_ReadCoord (net_message);
|
|
||||||
end[1] = MSG_ReadCoord (net_message);
|
|
||||||
end[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
// override any beam with the same entity
|
// override any beam with the same entity
|
||||||
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++)
|
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++)
|
||||||
|
@ -238,26 +233,20 @@ CL_ParseTEnt (void)
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TE_WIZSPIKE: // spike hitting wall
|
case TE_WIZSPIKE: // spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_WizSpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
S_StartSound (-1, 0, cl_sfx_wizhit, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_wizhit, pos, 1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_KNIGHTSPIKE: // spike hitting wall
|
case TE_KNIGHTSPIKE: // spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_KnightSpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
S_StartSound (-1, 0, cl_sfx_knighthit, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_knighthit, pos, 1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_SPIKE: // spike hitting wall
|
case TE_SPIKE: // spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_SpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
|
|
||||||
if (rand () % 5)
|
if (rand () % 5)
|
||||||
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
||||||
|
@ -273,10 +262,8 @@ CL_ParseTEnt (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_SUPERSPIKE: // super spike hitting wall
|
case TE_SUPERSPIKE: // super spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_SuperSpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
|
|
||||||
if (rand () % 5)
|
if (rand () % 5)
|
||||||
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
||||||
|
@ -293,9 +280,7 @@ CL_ParseTEnt (void)
|
||||||
|
|
||||||
case TE_EXPLOSION: // rocket explosion
|
case TE_EXPLOSION: // rocket explosion
|
||||||
// particles
|
// particles
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_ParticleExplosion (pos);
|
R_ParticleExplosion (pos);
|
||||||
|
|
||||||
// light
|
// light
|
||||||
|
@ -319,9 +304,7 @@ CL_ParseTEnt (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_TAREXPLOSION: // tarbaby explosion
|
case TE_TAREXPLOSION: // tarbaby explosion
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_BlobExplosion (pos);
|
R_BlobExplosion (pos);
|
||||||
|
|
||||||
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
|
||||||
|
@ -346,23 +329,17 @@ CL_ParseTEnt (void)
|
||||||
// PGM 01/21/97
|
// PGM 01/21/97
|
||||||
|
|
||||||
case TE_LAVASPLASH:
|
case TE_LAVASPLASH:
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_LavaSplash (pos);
|
R_LavaSplash (pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_TELEPORT:
|
case TE_TELEPORT:
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_TeleportSplash (pos);
|
R_TeleportSplash (pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_EXPLOSION2: // color mapped explosion
|
case TE_EXPLOSION2: // color mapped explosion
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
colorStart = MSG_ReadByte (net_message);
|
colorStart = MSG_ReadByte (net_message);
|
||||||
colorLength = MSG_ReadByte (net_message);
|
colorLength = MSG_ReadByte (net_message);
|
||||||
R_ParticleExplosion2 (pos, colorStart, colorLength);
|
R_ParticleExplosion2 (pos, colorStart, colorLength);
|
||||||
|
@ -381,22 +358,18 @@ CL_ParseTEnt (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_GUNSHOT: // bullet hitting wall
|
case TE_GUNSHOT: // bullet hitting wall
|
||||||
case TE_BLOOD: // bullets hitting body
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
if (type == TE_GUNSHOT) {
|
R_GunshotEffect (pos, 20);
|
||||||
cnt = 20;
|
break;
|
||||||
} else {
|
|
||||||
cnt = MSG_ReadByte (net_message) * 20;
|
case TE_BLOOD: // bullet hitting body
|
||||||
}
|
cnt = MSG_ReadByte (net_message) * 20;
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_BloodPuffEffect (pos, cnt);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunPuffEffect (pos, prot_to_rend[type], cnt);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_LIGHTNINGBLOOD: // lightning hitting body
|
case TE_LIGHTNINGBLOOD: // lightning hitting body
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
// light
|
// light
|
||||||
dl = R_AllocDlight (0);
|
dl = R_AllocDlight (0);
|
||||||
|
@ -408,7 +381,7 @@ CL_ParseTEnt (void)
|
||||||
dl->color[1] = 0.40;
|
dl->color[1] = 0.40;
|
||||||
dl->color[2] = 0.65;
|
dl->color[2] = 0.65;
|
||||||
|
|
||||||
R_RunPuffEffect (pos, prot_to_rend[type], 50);
|
R_LightningBloodEffect (pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -517,8 +490,7 @@ CL_ParseParticleEffect (void)
|
||||||
int i, count, color;
|
int i, count, color;
|
||||||
vec3_t org, dir;
|
vec3_t org, dir;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
MSG_ReadCoord3 (net_message, org);
|
||||||
org[i] = MSG_ReadCoord (net_message);
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
dir[i] = MSG_ReadChar (net_message) * (15.0 / 16.0);
|
dir[i] = MSG_ReadChar (net_message) * (15.0 / 16.0);
|
||||||
count = MSG_ReadByte (net_message);
|
count = MSG_ReadByte (net_message);
|
||||||
|
|
|
@ -211,13 +211,12 @@ V_ParseDamage (void)
|
||||||
{
|
{
|
||||||
entity_t *ent;
|
entity_t *ent;
|
||||||
float count, side;
|
float count, side;
|
||||||
int armor, blood, i;
|
int armor, blood;
|
||||||
vec3_t from, forward, right, up;
|
vec3_t from, forward, right, up;
|
||||||
|
|
||||||
armor = MSG_ReadByte (net_message);
|
armor = MSG_ReadByte (net_message);
|
||||||
blood = MSG_ReadByte (net_message);
|
blood = MSG_ReadByte (net_message);
|
||||||
for (i = 0; i < 3; i++)
|
MSG_ReadCoord3 (net_message, from);
|
||||||
from[i] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
count = blood * 0.5 + armor * 0.5;
|
count = blood * 0.5 + armor * 0.5;
|
||||||
if (count < 10)
|
if (count < 10)
|
||||||
|
|
|
@ -527,7 +527,7 @@ CL_LinkPacketEntities (void)
|
||||||
else if (model->flags & EF_ZOMGIB)
|
else if (model->flags & EF_ZOMGIB)
|
||||||
R_SlightBloodTrail (*ent);
|
R_SlightBloodTrail (*ent);
|
||||||
else if (model->flags & EF_TRACER)
|
else if (model->flags & EF_TRACER)
|
||||||
R_GreenTrail (*ent);
|
R_WizTrail (*ent);
|
||||||
else if (model->flags & EF_TRACER2)
|
else if (model->flags & EF_TRACER2)
|
||||||
R_FlameTrail (*ent);
|
R_FlameTrail (*ent);
|
||||||
else if (model->flags & EF_TRACER3)
|
else if (model->flags & EF_TRACER3)
|
||||||
|
@ -610,9 +610,7 @@ CL_ParsePlayerinfo (void)
|
||||||
flags = state->flags = MSG_ReadShort (net_message);
|
flags = state->flags = MSG_ReadShort (net_message);
|
||||||
|
|
||||||
state->messagenum = cl.parsecount;
|
state->messagenum = cl.parsecount;
|
||||||
state->origin[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, state->origin);
|
||||||
state->origin[1] = MSG_ReadCoord (net_message);
|
|
||||||
state->origin[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
state->frame = MSG_ReadByte (net_message);
|
state->frame = MSG_ReadByte (net_message);
|
||||||
|
|
||||||
|
|
|
@ -854,11 +854,10 @@ CL_ParseStatic (void)
|
||||||
void
|
void
|
||||||
CL_ParseStaticSound (void)
|
CL_ParseStaticSound (void)
|
||||||
{
|
{
|
||||||
int sound_num, vol, atten, i;
|
int sound_num, vol, atten;
|
||||||
vec3_t org;
|
vec3_t org;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
MSG_ReadCoord3 (net_message, org);
|
||||||
org[i] = MSG_ReadCoord (net_message);
|
|
||||||
sound_num = MSG_ReadByte (net_message);
|
sound_num = MSG_ReadByte (net_message);
|
||||||
vol = MSG_ReadByte (net_message);
|
vol = MSG_ReadByte (net_message);
|
||||||
atten = MSG_ReadByte (net_message);
|
atten = MSG_ReadByte (net_message);
|
||||||
|
@ -872,7 +871,7 @@ void
|
||||||
CL_ParseStartSoundPacket (void)
|
CL_ParseStartSoundPacket (void)
|
||||||
{
|
{
|
||||||
float attenuation;
|
float attenuation;
|
||||||
int channel, ent, sound_num, volume, i;
|
int channel, ent, sound_num, volume;
|
||||||
vec3_t pos;
|
vec3_t pos;
|
||||||
|
|
||||||
channel = MSG_ReadShort (net_message);
|
channel = MSG_ReadShort (net_message);
|
||||||
|
@ -889,8 +888,7 @@ CL_ParseStartSoundPacket (void)
|
||||||
|
|
||||||
sound_num = MSG_ReadByte (net_message);
|
sound_num = MSG_ReadByte (net_message);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[i] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
ent = (channel >> 3) & 1023;
|
ent = (channel >> 3) & 1023;
|
||||||
channel &= 7;
|
channel &= 7;
|
||||||
|
@ -1319,8 +1317,8 @@ CL_ParseServerMessage (void)
|
||||||
cl.completed_time = realtime;
|
cl.completed_time = realtime;
|
||||||
vid.recalc_refdef = true; // go to full screen
|
vid.recalc_refdef = true; // go to full screen
|
||||||
Con_DPrintf ("intermission simorg: ");
|
Con_DPrintf ("intermission simorg: ");
|
||||||
|
MSG_ReadCoord3 (net_message, cl.simorg);
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
cl.simorg[i] = MSG_ReadCoord (net_message);
|
|
||||||
Con_DPrintf ("%f ", cl.simorg[i]);
|
Con_DPrintf ("%f ", cl.simorg[i]);
|
||||||
}
|
}
|
||||||
Con_DPrintf ("\nintermission simangles: ");
|
Con_DPrintf ("\nintermission simangles: ");
|
||||||
|
|
|
@ -191,13 +191,8 @@ CL_ParseBeam (model_t *m)
|
||||||
|
|
||||||
ent = MSG_ReadShort (net_message);
|
ent = MSG_ReadShort (net_message);
|
||||||
|
|
||||||
start[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, start);
|
||||||
start[1] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, end);
|
||||||
start[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
end[0] = MSG_ReadCoord (net_message);
|
|
||||||
end[1] = MSG_ReadCoord (net_message);
|
|
||||||
end[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
// override any beam with the same entity
|
// override any beam with the same entity
|
||||||
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++)
|
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++)
|
||||||
|
@ -238,26 +233,20 @@ CL_ParseTEnt (void)
|
||||||
type = MSG_ReadByte (net_message);
|
type = MSG_ReadByte (net_message);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TE_WIZSPIKE: // spike hitting wall
|
case TE_WIZSPIKE: // spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_WizSpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
S_StartSound (-1, 0, cl_sfx_wizhit, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_wizhit, pos, 1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_KNIGHTSPIKE: // spike hitting wall
|
case TE_KNIGHTSPIKE: // spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_KnightSpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
S_StartSound (-1, 0, cl_sfx_knighthit, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_knighthit, pos, 1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_SPIKE: // spike hitting wall
|
case TE_SPIKE: // spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_SpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
|
|
||||||
if (rand () % 5)
|
if (rand () % 5)
|
||||||
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
||||||
|
@ -273,10 +262,8 @@ CL_ParseTEnt (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_SUPERSPIKE: // super spike hitting wall
|
case TE_SUPERSPIKE: // super spike hitting wall
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_SuperSpikeEffect (pos);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_RunSpikeEffect (pos, prot_to_rend[type]);
|
|
||||||
|
|
||||||
if (rand () % 5)
|
if (rand () % 5)
|
||||||
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
|
||||||
|
@ -293,9 +280,7 @@ CL_ParseTEnt (void)
|
||||||
|
|
||||||
case TE_EXPLOSION: // rocket explosion
|
case TE_EXPLOSION: // rocket explosion
|
||||||
// particles
|
// particles
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_ParticleExplosion (pos);
|
R_ParticleExplosion (pos);
|
||||||
|
|
||||||
// light
|
// light
|
||||||
|
@ -319,9 +304,7 @@ CL_ParseTEnt (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_TAREXPLOSION: // tarbaby explosion
|
case TE_TAREXPLOSION: // tarbaby explosion
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_BlobExplosion (pos);
|
R_BlobExplosion (pos);
|
||||||
|
|
||||||
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
|
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
|
||||||
|
@ -346,23 +329,17 @@ CL_ParseTEnt (void)
|
||||||
// PGM 01/21/97
|
// PGM 01/21/97
|
||||||
|
|
||||||
case TE_LAVASPLASH:
|
case TE_LAVASPLASH:
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_LavaSplash (pos);
|
R_LavaSplash (pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_TELEPORT:
|
case TE_TELEPORT:
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
R_TeleportSplash (pos);
|
R_TeleportSplash (pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_EXPLOSION2: // color mapped explosion
|
case TE_EXPLOSION2: // color mapped explosion
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
colorStart = MSG_ReadByte (net_message);
|
colorStart = MSG_ReadByte (net_message);
|
||||||
colorLength = MSG_ReadByte (net_message);
|
colorLength = MSG_ReadByte (net_message);
|
||||||
R_ParticleExplosion2 (pos, colorStart, colorLength);
|
R_ParticleExplosion2 (pos, colorStart, colorLength);
|
||||||
|
@ -381,18 +358,19 @@ CL_ParseTEnt (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_GUNSHOT: // bullet hitting wall
|
case TE_GUNSHOT: // bullet hitting wall
|
||||||
case TE_BLOOD: // bullets hitting body
|
|
||||||
cnt = MSG_ReadByte (net_message) * 20;
|
cnt = MSG_ReadByte (net_message) * 20;
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
R_GunshotEffect (pos, cnt);
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
break;
|
||||||
R_RunPuffEffect (pos, prot_to_rend[type], cnt);
|
|
||||||
|
case TE_BLOOD: // bullet hitting body
|
||||||
|
cnt = MSG_ReadByte (net_message) * 20;
|
||||||
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
|
R_BloodPuffEffect (pos, cnt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TE_LIGHTNINGBLOOD: // lightning hitting body
|
case TE_LIGHTNINGBLOOD: // lightning hitting body
|
||||||
pos[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, pos);
|
||||||
pos[1] = MSG_ReadCoord (net_message);
|
|
||||||
pos[2] = MSG_ReadCoord (net_message);
|
|
||||||
|
|
||||||
// light
|
// light
|
||||||
dl = R_AllocDlight (0);
|
dl = R_AllocDlight (0);
|
||||||
|
@ -404,7 +382,7 @@ CL_ParseTEnt (void)
|
||||||
dl->color[1] = 0.40;
|
dl->color[1] = 0.40;
|
||||||
dl->color[2] = 0.65;
|
dl->color[2] = 0.65;
|
||||||
|
|
||||||
R_RunPuffEffect (pos, prot_to_rend[type], cnt);
|
R_LightningBloodEffect (pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1782,9 +1782,7 @@ SV_ExecuteClientMessage (client_t *cl)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case clc_tmove:
|
case clc_tmove:
|
||||||
o[0] = MSG_ReadCoord (net_message);
|
MSG_ReadCoord3 (net_message, o);
|
||||||
o[1] = MSG_ReadCoord (net_message);
|
|
||||||
o[2] = MSG_ReadCoord (net_message);
|
|
||||||
// only allowed by spectators
|
// only allowed by spectators
|
||||||
if (host_client->spectator) {
|
if (host_client->spectator) {
|
||||||
VectorCopy (o, SVvector (sv_player, origin));
|
VectorCopy (o, SVvector (sv_player, origin));
|
||||||
|
|
Loading…
Reference in a new issue