mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
small change to pressure system
This commit is contained in:
parent
b3c8d6171c
commit
59f5eb7564
5 changed files with 45 additions and 6 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.58 2002/04/29 06:17:39 niceass
|
||||
// small change to pressure system
|
||||
//
|
||||
// Revision 1.57 2002/04/23 06:04:12 niceass
|
||||
// pressure stuff
|
||||
//
|
||||
|
@ -997,7 +1000,7 @@ typedef enum {
|
|||
EV_BREAK_GLASS2,
|
||||
EV_BREAK_GLASS3,
|
||||
EV_CHIP_GLASS, //Blaze: this even just breaks it a little bit.
|
||||
EV_PRESSURE_WATER, //NiceAss: Shot an ent under pressure with water
|
||||
EV_PRESSURE, // NiceAss: an entity under pressure
|
||||
EV_SCOREPLUM, // score plum
|
||||
|
||||
//#ifdef MISSIONPACK
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.72 2002/04/29 06:17:20 niceass
|
||||
// small change to pressure system
|
||||
//
|
||||
// Revision 1.71 2002/04/28 11:03:46 slicer
|
||||
// Added "teammodel" for Matchmode, Referee "pause" command
|
||||
//
|
||||
|
@ -850,6 +853,7 @@ void G_RunDlight ( gentity_t *ent ); // Elder: dlight running
|
|||
void G_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result );
|
||||
void G_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t result );
|
||||
void G_GravityChange(void);
|
||||
void G_CreatePressure(vec3_t origin, vec3_t normal, gentity_t *ent);
|
||||
|
||||
//
|
||||
// g_weapon.c
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.33 2002/04/29 06:16:58 niceass
|
||||
// small change to pressure system
|
||||
//
|
||||
// Revision 1.32 2002/04/23 06:01:58 niceass
|
||||
// pressure stuff
|
||||
//
|
||||
|
@ -780,10 +783,29 @@ void SP_func_pressure( gentity_t *ent ) {
|
|||
G_Printf("Creating Pressure entity\n");
|
||||
trap_SetBrushModel( ent, ent->model );
|
||||
trap_LinkEntity (ent);
|
||||
|
||||
VectorCopy( ent->s.origin, ent->s.pos.trBase );
|
||||
VectorCopy( ent->s.origin, ent->r.currentOrigin );
|
||||
ent->s.eType = ET_PRESSURE;
|
||||
ent->damage = 2;
|
||||
|
||||
G_SpawnInt( "speed", "0", &ent->size);
|
||||
|
||||
// ent->spawnflags
|
||||
// flame, steam, water
|
||||
|
||||
// ent->s.frame holds type
|
||||
// ent->s.powerups holds speed
|
||||
}
|
||||
|
||||
void G_CreatePressure(vec3_t origin, vec3_t normal, gentity_t *ent) {
|
||||
gentity_t *tent;
|
||||
|
||||
tent = G_TempEntity( origin, EV_PRESSURE );
|
||||
tent->s.eventParm = DirToByte( normal );
|
||||
|
||||
tent->s.frame = ent->spawnflags; // 1 = water, 2 = steam, 4 = fire
|
||||
tent->s.powerups = ent->size; // speed of pressure
|
||||
G_Printf("Game: %d and %d\n", tent->s.frame, tent->s.powerups);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.26 2002/04/29 06:16:27 niceass
|
||||
// small change to pressure system
|
||||
//
|
||||
// Revision 1.25 2002/04/06 21:42:20 makro
|
||||
// Changes to bot code. New surfaceparm system.
|
||||
//
|
||||
|
@ -533,6 +536,9 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) {
|
|||
|
||||
//VectorCopy(xr_drop->s.origin, temp);
|
||||
VectorAdd(xr_drop->s.origin, knifeOffset, xr_drop->s.origin);
|
||||
|
||||
if ( other->s.eType == ET_PRESSURE )
|
||||
G_CreatePressure(xr_drop->s.origin, trace->plane.normal, &g_entities[trace->entityNum]);
|
||||
}
|
||||
|
||||
//Elder: transfer entity data into the shared entityState
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.49 2002/04/29 06:16:10 niceass
|
||||
// small change to pressure system
|
||||
//
|
||||
// Revision 1.48 2002/04/26 03:57:51 niceass
|
||||
// took some old stuff out + small pressure stuff
|
||||
//
|
||||
|
@ -570,7 +573,7 @@ void Bullet_Fire (gentity_t *ent, float spread, int damage, int MOD ) {
|
|||
tent->s.otherEntityNum = ent->s.number;
|
||||
} else if ( traceEnt->s.eType == ET_PRESSURE ) {
|
||||
// Pressure entities
|
||||
tent = G_TempEntity2( tr.endpos, EV_PRESSURE_WATER, DirToByte(tr.plane.normal) );
|
||||
G_CreatePressure(tr.endpos, tr.plane.normal, traceEnt);
|
||||
} else {
|
||||
tent = G_TempEntity( tr.endpos, EV_BULLET_HIT_WALL );
|
||||
tent->s.eventParm = DirToByte( tr.plane.normal );
|
||||
|
@ -1253,7 +1256,7 @@ void Knife_Attack ( gentity_t *self, int damage)
|
|||
|
||||
if ( hitent->s.eType == ET_PRESSURE ) {
|
||||
// Pressure entity
|
||||
tent = G_TempEntity2( tr.endpos, EV_PRESSURE_WATER, DirToByte(tr.plane.normal) );
|
||||
G_CreatePressure(tr.endpos, tr.plane.normal, hitent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1765,13 +1768,14 @@ void Weapon_SSG3000_Fire (gentity_t *ent) {
|
|||
tentWall = G_TempEntity( trace.endpos, EV_BULLET_HIT_METAL );
|
||||
else if (Material == MAT_GLASS)
|
||||
tentWall = G_TempEntity( trace.endpos, EV_BULLET_HIT_GLASS );
|
||||
else if ( traceEnt && traceEnt->s.eType == ET_PRESSURE )
|
||||
tentWall = G_TempEntity( trace.endpos, EV_PRESSURE_WATER );
|
||||
else
|
||||
tentWall = G_TempEntity( trace.endpos, EV_BULLET_HIT_WALL );
|
||||
|
||||
tentWall->s.eventParm = DirToByte( trace.plane.normal );
|
||||
tentWall->s.otherEntityNum = ent->s.number;
|
||||
|
||||
if ( traceEnt && traceEnt->s.eType == ET_PRESSURE )
|
||||
G_CreatePressure(trace.endpos, trace.plane.normal, traceEnt);
|
||||
}
|
||||
|
||||
// send railgun beam effect
|
||||
|
|
Loading…
Reference in a new issue