// spike hitting wall
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
- // LordHavoc: changed to spark shower
- CL_SparkShower(pos, vec3_origin, 15);
+ if (cl_particles_bulletimpacts.integer)
+ {
+ CL_SparkShower(pos, vec3_origin, 15, 1);
+ CL_Smoke(pos, vec3_origin, 15);
+ CL_BulletMark(pos);
+ }
if (rand() % 5)
S_StartSound(-1, 0, cl_sfx_tink1, pos, 1, 1);
else
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
// LordHavoc: changed to spark shower
- CL_SparkShower(pos, vec3_origin, 15);
+ if (cl_particles_bulletimpacts.integer)
+ {
+ CL_SparkShower(pos, vec3_origin, 15, 1);
+ CL_Smoke(pos, vec3_origin, 15);
+ CL_BulletMark(pos);
+ }
Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
CL_AllocDlight(NULL, &tempmatrix, 100, 0.15f, 0.15f, 1.5f, 500, 0.2, 0, 0, true, 1);
S_StartSound(-1, 0, cl_sfx_r_exp3, pos, 1, 1);
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
// LordHavoc: changed to dust shower
- CL_SparkShower(pos, vec3_origin, 30);
+ if (cl_particles_bulletimpacts.integer)
+ {
+ CL_SparkShower(pos, vec3_origin, 30, 1);
+ CL_Smoke(pos, vec3_origin, 30);
+ CL_BulletMark(pos);
+ }
if (rand() % 5)
S_StartSound(-1, 0, cl_sfx_tink1, pos, 1, 1);
else
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
// LordHavoc: changed to dust shower
- CL_SparkShower(pos, vec3_origin, 30);
+ if (cl_particles_bulletimpacts.integer)
+ {
+ CL_SparkShower(pos, vec3_origin, 30, 1);
+ CL_Smoke(pos, vec3_origin, 30);
+ CL_BulletMark(pos);
+ }
Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
CL_AllocDlight(NULL, &tempmatrix, 100, 0.15f, 0.15f, 1.5f, 500, 0.2, 0, 0, true, 1);
if (rand() % 5)
dir[1] = MSG_ReadChar();
dir[2] = MSG_ReadChar();
count = MSG_ReadByte();
- CL_SparkShower(pos, dir, count);
+ CL_SparkShower(pos, dir, count, 1);
break;
case TE_PLASMABURN:
MSG_ReadVector(pos, cl.protocol);
// bullet hitting wall
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
- // LordHavoc: changed to dust shower
- CL_SparkShower(pos, vec3_origin, 15);
+ CL_SparkShower(pos, vec3_origin, 15, 1);
+ CL_Smoke(pos, vec3_origin, 15);
+ CL_BulletMark(pos);
break;
case TE_GUNSHOTQUAD:
// quad bullet hitting wall
MSG_ReadVector(pos, cl.protocol);
CL_FindNonSolidLocation(pos, pos, 4);
- CL_SparkShower(pos, vec3_origin, 15);
+ CL_SparkShower(pos, vec3_origin, 15, 1);
+ CL_Smoke(pos, vec3_origin, 15);
+ CL_BulletMark(pos);
Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
CL_AllocDlight(NULL, &tempmatrix, 100, 0.15f, 0.15f, 1.5f, 500, 0.2, 0, 0, true, 1);
break;
CL_SparkShower
===============
*/
-void CL_SparkShower (vec3_t org, vec3_t dir, int count)
+void CL_SparkShower (vec3_t org, vec3_t dir, int count, vec_t gravityscale)
{
- vec3_t org2, org3;
int k;
- if (cl_stainmaps.integer)
- R_Stain(org, 32, 96, 96, 96, 24, 128, 128, 128, 24);
- CL_SpawnDecalParticleForPoint(org, 6, 3, 255, tex_bulletdecal[rand()&7], 0xFFFFFF, 0xFFFFFF);
-
if (!cl_particles.integer) return;
- if (cl_particles_bulletimpacts.integer)
+ if (cl_particles_sparks.integer)
{
- // smoke puff
- if (cl_particles_smoke.integer)
+ // sparks
+ count *= cl_particles_quality.value;
+ while(count--)
{
- k = count * 0.25 * cl_particles_quality.value;
- while(k--)
- {
- org2[0] = org[0] + 0.125f * lhrandom(-count, count);
- org2[1] = org[1] + 0.125f * lhrandom(-count, count);
- org2[2] = org[2] + 0.125f * lhrandom(-count, count);
- CL_TraceLine(org, org2, org3, NULL, true, NULL, SUPERCONTENTS_SOLID);
- particle(pt_grow, PARTICLE_BILLBOARD, 0x101010, 0x202020, tex_smoke[rand()&7], true, PBLEND_ADD, 3, 3, (1.0f / cl_particles_quality.value) * 255, (1.0f / cl_particles_quality.value) * 1024, 9999, -0.2, 0, org3[0], org3[1], org3[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(0, 16), 15, 0, 0, 0, 0.2, 0);
- }
+ k = particlepalette[0x68 + (rand() & 7)];
+ particle(pt_static, PARTICLE_SPARK, k, k, tex_particle, false, PBLEND_ADD, 0.4f, 0.015f, (1.0f / cl_particles_quality.value) * lhrandom(64, 255), (1.0f / cl_particles_quality.value) * 512, 9999, gravityscale, 0, org[0], org[1], org[2], lhrandom(-64, 64) + dir[0], lhrandom(-64, 64) + dir[1], lhrandom(0, 128) + dir[2], 0, 0, 0, 0, 0, 0);
}
+ }
+}
- if (cl_particles_sparks.integer)
+void CL_Smoke (vec3_t org, vec3_t dir, int count)
+{
+ vec3_t org2, org3;
+ int k;
+
+ if (!cl_particles.integer) return;
+
+ // smoke puff
+ if (cl_particles_smoke.integer)
+ {
+ k = count * 0.25 * cl_particles_quality.value;
+ while(k--)
{
- // sparks
- count *= cl_particles_quality.value;
- while(count--)
- {
- k = particlepalette[0x68 + (rand() & 7)];
- particle(pt_static, PARTICLE_SPARK, k, k, tex_particle, false, PBLEND_ADD, 0.4f, 0.015f, (1.0f / cl_particles_quality.value) * lhrandom(64, 255), (1.0f / cl_particles_quality.value) * 512, 9999, 1, 0, org[0], org[1], org[2], lhrandom(-64, 64) + dir[0], lhrandom(-64, 64) + dir[1], lhrandom(0, 128) + dir[2], 0, 0, 0, 0, 0.2, 0);
- }
+ org2[0] = org[0] + 0.125f * lhrandom(-count, count);
+ org2[1] = org[1] + 0.125f * lhrandom(-count, count);
+ org2[2] = org[2] + 0.125f * lhrandom(-count, count);
+ CL_TraceLine(org, org2, org3, NULL, true, NULL, SUPERCONTENTS_SOLID);
+ particle(pt_grow, PARTICLE_BILLBOARD, 0x101010, 0x202020, tex_smoke[rand()&7], true, PBLEND_ADD, 3, 3, (1.0f / cl_particles_quality.value) * 255, (1.0f / cl_particles_quality.value) * 1024, 9999, 0, 0, org3[0], org3[1], org3[2], lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(-8, 8), 15, 0, 0, 0, 0, 0);
}
}
}
+void CL_BulletMark (vec3_t org)
+{
+ if (cl_stainmaps.integer)
+ R_Stain(org, 32, 96, 96, 96, 24, 128, 128, 128, 24);
+ CL_SpawnDecalParticleForPoint(org, 6, 3, 255, tex_bulletdecal[rand()&7], 0xFFFFFF, 0xFFFFFF);
+}
+
void CL_PlasmaBurn (vec3_t org)
{
if (cl_stainmaps.integer)
// cl_part
//
+extern cvar_t cl_particles;
+extern cvar_t cl_particles_quality;
+extern cvar_t cl_particles_size;
+extern cvar_t cl_particles_bloodshowers;
+extern cvar_t cl_particles_blood;
+extern cvar_t cl_particles_blood_alpha;
+extern cvar_t cl_particles_blood_bloodhack;
+extern cvar_t cl_particles_bulletimpacts;
+extern cvar_t cl_particles_explosions_bubbles;
+extern cvar_t cl_particles_explosions_smoke;
+extern cvar_t cl_particles_explosions_sparks;
+extern cvar_t cl_particles_explosions_shell;
+extern cvar_t cl_particles_smoke;
+extern cvar_t cl_particles_smoke_alpha;
+extern cvar_t cl_particles_smoke_alphafade;
+extern cvar_t cl_particles_sparks;
+extern cvar_t cl_particles_bubbles;
+extern cvar_t cl_decals;
+extern cvar_t cl_decals_time;
+extern cvar_t cl_decals_fadetime;
+
void CL_Particles_Clear(void);
void CL_Particles_Init(void);
void CL_ParseParticleEffect (void);
void CL_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
void CL_RocketTrail (vec3_t start, vec3_t end, int type, int color, entity_t *ent);
-void CL_SparkShower (vec3_t org, vec3_t dir, int count);
+void CL_SparkShower (vec3_t org, vec3_t dir, int count, vec_t gravityscale);
+void CL_Smoke (vec3_t org, vec3_t dir, int count);
+void CL_BulletMark (vec3_t org);
void CL_PlasmaBurn (vec3_t org);
void CL_BloodPuff (vec3_t org, vec3_t vel, int count);
void CL_Stardust (vec3_t mins, vec3_t maxs, int count);
extern cvar_t r_detailtextures;
-extern cvar_t cl_particles;
extern cvar_t cl_stainmaps;
extern cvar_t cl_stainmapsclearonload;
-extern cvar_t cl_decals;
extern cvar_t r_explosionclip;
extern cvar_t r_modellights;
extern cvar_t r_coronas;
extern cvar_t gl_flashblend;
-extern cvar_t cl_particles_quality;
-extern cvar_t cl_particles_bulletimpacts;
-extern cvar_t cl_particles_smoke;
-extern cvar_t cl_particles_sparks;
-extern cvar_t cl_particles_bubbles;
-extern cvar_t cl_particles_blood;
-extern cvar_t cl_particles_blood_alpha;
-extern cvar_t cl_particles_blood_bloodhack;
-extern cvar_t cl_particles_explosions_shell;
extern cvar_t cl_beams_polygon;
extern cvar_t cl_beams_relative;
extern cvar_t cl_beams_lightatend;