pressure stuff

This commit is contained in:
Bryce Hutchings 2002-05-26 05:14:14 +00:00
parent b8c6577529
commit 101e0d4cbc
2 changed files with 22 additions and 22 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.14 2002/05/26 05:14:14 niceass
// pressure stuff
//
// Revision 1.13 2002/05/18 03:55:35 niceass // Revision 1.13 2002/05/18 03:55:35 niceass
// many misc. changes // many misc. changes
// //
@ -232,7 +235,7 @@ void CG_ReflectVelocity( localEntity_t *le, trace_t *trace ) {
float dot; float dot;
int hitTime; int hitTime;
// NiceAss: Make the reflection less perfect // NiceAss: Make the reflection less perfect (for brass)
VectorCopy( trace->plane.normal, normal ); VectorCopy( trace->plane.normal, normal );
if (le->leFlags == LEF_TUMBLE) { if (le->leFlags == LEF_TUMBLE) {
@ -834,27 +837,24 @@ void CG_AddPressureEntity ( localEntity_t *le ) {
alpha = -(cg.time - le->startTime) + (le->endTime - le->startTime); alpha = -(cg.time - le->startTime) + (le->endTime - le->startTime);
alpha /= (le->endTime - le->startTime); alpha /= (le->endTime - le->startTime);
//steamSound
for (l = 0; l < 1; l++) {
/*
VectorScale(le->pos.trDelta, 200 + rand() % 30, velocity);
velocity[0] += rand() % 20 - 10; //steamSound!!!
velocity[1] += rand() % 20 - 10;
velocity[2] = 0; for (l = 0; l < 1; l++) {
*/
// steam: // steam:
VectorScale(le->pos.trDelta, 200 + rand() % 30, velocity); VectorScale(le->pos.trDelta, le->size + rand() % 30, velocity);
velocity[0] += rand() % 40 - 20; velocity[0] += rand() % 40 - 20;
velocity[1] += rand() % 40 - 20; velocity[1] += rand() % 40 - 20;
VectorCopy(le->pos.trBase, origin); VectorCopy(le->pos.trBase, origin);
//VectorMA(origin, 10, velocity, origin);
//CG_ParticleWater(le->pos.trBase, velocity, 200 + rand() % 120, alpha, -8, 1 ); if (le->leFlags == LEF_WATER)
//CG_ParticleSteam(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 1, 1 ); CG_ParticleWater(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 2, 1 );
CG_ParticleSteam(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 2, 1 ); else if (le->leFlags == LEF_FLAME)
CG_ParticleSteam(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 2, 1, cgs.media.grenadeExplosionShader );
else
CG_ParticleSteam(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 2, 1, cgs.media.smokePuffShader );
} }
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.9 2002/05/26 05:14:05 niceass
// pressure stuff
//
// Revision 1.8 2002/04/29 06:13:31 niceass // Revision 1.8 2002/04/29 06:13:31 niceass
// small particle stuff // small particle stuff
// //
@ -2332,11 +2335,10 @@ void CG_ParticleWater (vec3_t org, vec3_t vel, int duration, float alpha, float
VectorCopy(org, p->org); VectorCopy(org, p->org);
p->vel[0] = vel[0]; p->vel[0] = vel[0] * speed;
p->vel[1] = vel[1]; p->vel[1] = vel[1] * speed;
p->vel[2] = vel[2]; p->vel[2] = vel[2] * speed;
// Elder: old settings
p->accel[0] = p->accel[1] = 0; p->accel[0] = p->accel[1] = 0;
p->accel[2] = -PARTICLE_GRAVITY * 4; p->accel[2] = -PARTICLE_GRAVITY * 4;
@ -2345,7 +2347,7 @@ void CG_ParticleWater (vec3_t org, vec3_t vel, int duration, float alpha, float
p->vel[2] += (20 + (crandom() * 10)) * speed; p->vel[2] += (20 + (crandom() * 10)) * speed;
} }
void CG_ParticleSteam (vec3_t org, vec3_t vel, int duration, float alpha, float speed, float scale) void CG_ParticleSteam (vec3_t org, vec3_t vel, int duration, float alpha, float speed, float scale, int Shader)
{ {
cparticle_t *p; cparticle_t *p;
@ -2371,9 +2373,7 @@ void CG_ParticleSteam (vec3_t org, vec3_t vel, int duration, float alpha, float
p->rotate = qtrue; p->rotate = qtrue;
p->roll = crandom()*179; p->roll = crandom()*179;
p->pshader = cgs.media.smokePuffShader; p->pshader = Shader;
//cgs.media.grenadeExplosionShader
p->type = P_SMOKE; p->type = P_SMOKE;