From b872e6e113c5372b9d698fc457fe620b195f5dfd Mon Sep 17 00:00:00 2001 From: Roman Tetelman Date: Sat, 3 Oct 2009 11:51:48 +0000 Subject: * wide traces (most alien attacks) now prefer the target in the crosshairs if there is one --- src/game/g_weapon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index b68badb9..47ad4765 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -157,9 +157,12 @@ static void G_WideTrace( trace_t *tr, gentity_t *ent, float range, VectorMA( muzzle, range, forward, end ); G_UnlaggedOn( muzzle, range ); + //prefer the target in the crosshairs + trap_Trace( tr, muzzle, NULL, NULL, end, ent->s.number, CONTENTS_BODY ); // Trace against entities - trap_Trace( tr, muzzle, mins, maxs, end, ent->s.number, CONTENTS_BODY ); + if( tr->entityNum == ENTITYNUM_NONE ) + trap_Trace( tr, muzzle, mins, maxs, end, ent->s.number, CONTENTS_BODY ); // If we started in a solid that means someone is within our muzzle box, // the trace didn't give us the entity number though so do a trace -- cgit