summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_public.h3
-rw-r--r--src/game/g_weapon.c22
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;