diff options
author | Tim Angus <tim@ngus.net> | 2003-09-24 17:33:27 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2003-09-24 17:33:27 +0000 |
commit | a17c3a4d4a9a719a630e7a3a78d640e950337d21 (patch) | |
tree | b556d2a397fbea09b0fdc8e25e94ca9100855af8 /src/game | |
parent | 51f8195fe9846eaf3482da7ccce44064a7c2900a (diff) |
* 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
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_weapon.c | 22 |
2 files changed, 17 insertions, 8 deletions
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; |