diff options
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r-- | src/game/g_weapon.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 7c3ed254..d71de3dd 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -466,14 +466,21 @@ MASS DRIVER void massDriverFire( gentity_t *ent ) { trace_t tr; + vec3_t end; gentity_t *tent; gentity_t *traceEnt; - G_WideTrace( &tr, ent, 8192.0f * 16.0f, MDRIVER_WIDTH, MDRIVER_WIDTH, &traceEnt ); + VectorMA( muzzle, 8192.0f * 16.0f, forward, end ); + + G_UnlaggedOn( ent, muzzle, 8192.0f * 16.0f ); + trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, MASK_SHOT ); + G_UnlaggedOff( ); if( tr.surfaceFlags & SURF_NOIMPACT ) return; + traceEnt = &g_entities[ tr.entityNum ]; + // snap the endpos to integers, but nudged towards the line SnapVectorTowards( tr.endpos, muzzle ); @@ -482,15 +489,10 @@ void massDriverFire( gentity_t *ent ) (traceEnt->s.eType == ET_BUILDABLE || traceEnt->s.eType == ET_PLAYER ) ) { - WideBloodSpurt( ent, traceEnt, &tr ); + BloodSpurt( ent, traceEnt, &tr ); } else { - // If we missed, G_WideTrace hasn't traced against the world - // so we need to do another trace to find the endpoint - vec3_t end; - VectorMA( muzzle, 8192.0f * 16.0f, forward, end ); - trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, CONTENTS_SOLID ); tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS ); tent->s.eventParm = DirToByte( tr.plane.normal ); tent->s.weapon = ent->s.weapon; |