added "life" setting to func_pressure

This commit is contained in:
Bryce Hutchings 2002-08-25 07:09:20 +00:00
parent b9fb2fc34e
commit cb6e153b8a
5 changed files with 31 additions and 12 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.41 2002/08/25 07:09:20 niceass
// added "life" setting to func_pressure
//
// Revision 1.40 2002/08/21 07:09:54 jbravo
// Removed an extra definition of the vtos call
//
@ -1140,7 +1143,7 @@ void CG_BreakBreakable(centity_t * cent, int eParam, int number)
}
void CG_Pressure(vec3_t origin, vec3_t dir, int type, int speed)
void CG_Pressure(vec3_t origin, vec3_t dir, int type, int speed, int life)
{
localEntity_t *le;
refEntity_t *re;
@ -1159,6 +1162,7 @@ void CG_Pressure(vec3_t origin, vec3_t dir, int type, int speed)
le->leFlags = LEF_STEAM;
le->size = (float) speed; // Size holds the speed.... yes...
le->life = life;
VectorCopy(origin, le->pos.trBase);
VectorCopy(dir, le->pos.trDelta);

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.68 2002/08/25 07:09:00 niceass
// added "life" setting to func_pressure
//
// Revision 1.67 2002/07/22 06:31:11 niceass
// cleaned up the powerup code
//
@ -1384,7 +1387,7 @@ void CG_EntityEvent(centity_t * cent, vec3_t position)
case EV_PRESSURE:
DEBUGNAME("EV_PRESSURE");
ByteToDir(es->eventParm, dir);
CG_Pressure(position, dir, es->frame, es->powerups);
CG_Pressure(position, dir, es->frame, es->powerups, es->constantLight);
break;
case EV_STOPLOOPINGSOUND:

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.119 2002/08/25 07:08:41 niceass
// added "life" setting to func_pressure
//
// Revision 1.118 2002/08/25 00:45:24 niceass
// q3f atmosphere
//
@ -569,8 +572,11 @@ typedef struct localEntity_s {
leBounceSoundType_t leBounceSoundType;
refEntity_t refEntity;
// JBravo: for func_explosive
// JBravo: for func_explosive
float size;
// NiceAss: for func_pressure
int life;
} localEntity_t;
//======================================================================
@ -2039,7 +2045,7 @@ void CG_EjectBloodSplat(vec3_t origin, vec3_t velocity, int amount, int duration
localEntity_t *CG_MakeExplosion(vec3_t origin, vec3_t dir,
qhandle_t hModel, qhandle_t shader, int msec, qboolean isSprite);
void CG_Pressure(vec3_t origin, vec3_t dir, int type, int speed);
void CG_Pressure(vec3_t origin, vec3_t dir, int type, int speed, int life);
//
// cg_snapshot.c

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.20 2002/08/25 07:08:18 niceass
// added "life" setting to func_pressure
//
// Revision 1.19 2002/07/02 07:22:10 niceass
// kill pressures at LCA
//
@ -707,12 +710,13 @@ void CG_AddPressureEntity(localEntity_t * le)
VectorCopy(le->pos.trBase, origin);
if (le->leFlags == LEF_AIR)
CG_ParticleAir(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 2, 1);
CG_ParticleAir(le->pos.trBase, velocity, le->life + 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.flamePressureShader);
CG_ParticleSteam(le->pos.trBase, velocity, le->life + rand() % 120, alpha, 2, 1,
cgs.media.flamePressureShader);
else
CG_ParticleSteam(le->pos.trBase, velocity, 200 + rand() % 120, alpha, 2, 1, cgs.media.smokePuffShader);
CG_ParticleSteam(le->pos.trBase, velocity, le->life + rand() % 120, alpha, 2, 1,
cgs.media.smokePuffShader);
}
/*

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.61 2002/08/25 07:07:42 niceass
// added "life" setting to func_pressure
//
// Revision 1.60 2002/08/21 02:56:08 blaze
// added spawnflags 8 for breakables, lets mappers turn off kicking
//
@ -978,12 +981,10 @@ void SP_func_pressure(gentity_t * ent)
VectorCopy(ent->s.origin, ent->r.currentOrigin);
ent->s.eType = ET_PRESSURE;
G_SpawnInt("speed", "0", &ent->mass); // mass will hold speed... yeah...
G_SpawnInt("speed", "200", &ent->mass); // mass will hold speed... yeah...
G_SpawnInt("life", "200", &ent->tension); // hmm..
G_SpawnString("type", "steam", &type);
if (ent->mass == 0)
ent->mass = 200;
if (!Q_stricmp(type, "air")) // bounce will hold pressure type... yeah...
ent->bounce = 1;
else if (!Q_stricmp(type, "flame") || !Q_stricmp(type, "fire"))
@ -1009,6 +1010,7 @@ void G_CreatePressure(vec3_t origin, vec3_t normal, gentity_t * ent)
tent->s.frame = ent->bounce; // 1 = air, 2 = flame, 0 = steam
tent->s.powerups = ent->mass; // speed of pressure
tent->s.constantLight = ent->tension; // 200 default. Life of steam
}
/*