From a17c3a4d4a9a719a630e7a3a78d640e950337d21 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 24 Sep 2003 17:33:27 +0000 Subject: * Impact and muzzle flashes now use new particle system * Hitscan weapons now use more generalised impact events * Added functions that are called when an entity leaves and enters the PVS --- src/game/bg_public.h | 3 --- src/game/g_weapon.c | 22 +++++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'src/game') diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 920df33b..ad7404df 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -506,9 +506,6 @@ typedef enum EV_BULLET_HIT_FLESH, EV_BULLET_HIT_WALL, - EV_LAS_HIT_FLESH, - EV_LAS_HIT_WALL, - EV_MASS_DRIVER_HIT, EV_MISSILE_HIT, EV_MISSILE_MISS, diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index fd44840c..1b1de4ab 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -182,8 +182,18 @@ void massDriverFire( gentity_t *ent ) SnapVectorTowards( tr.endpos, muzzle ); // send impact - tent = G_TempEntity( tr.endpos, EV_MASS_DRIVER_HIT ); - tent->s.eventParm = DirToByte( tr.plane.normal ); + if( traceEnt->takedamage && traceEnt->client ) + { + tent = G_TempEntity( tr.endpos, EV_MISSILE_HIT ); + tent->s.otherEntityNum = traceEnt->s.number; + tent->s.eventParm = DirToByte( tr.plane.normal ); + tent->s.weapon = ent->s.weapon; + } + else + { + tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS ); + tent->s.eventParm = DirToByte( tr.plane.normal ); + } if( traceEnt->takedamage ) { @@ -309,12 +319,14 @@ void lasGunFire( gentity_t *ent ) // send bullet impact if( traceEnt->takedamage && traceEnt->client ) { - tent = G_TempEntity( tr.endpos, EV_LAS_HIT_FLESH ); - tent->s.eventParm = traceEnt->s.number; + tent = G_TempEntity( tr.endpos, EV_MISSILE_HIT ); + tent->s.otherEntityNum = traceEnt->s.number; + tent->s.eventParm = DirToByte( tr.plane.normal ); + tent->s.weapon = ent->s.weapon; } else { - tent = G_TempEntity( tr.endpos, EV_LAS_HIT_WALL ); + tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS ); tent->s.eventParm = DirToByte( tr.plane.normal ); } tent->s.otherEntityNum = ent->s.number; -- cgit