summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_weapon.c5
1 files changed, 4 insertions, 1 deletions
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