From c0d374ec657dd7824c47c9884943af19365b0fde Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 27 Jan 2013 23:10:27 +0000 Subject: Improved aim on nearby targets. --- src/client/targets.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/targets.cc b/src/client/targets.cc index 3e8acee..1f8b8a1 100644 --- a/src/client/targets.cc +++ b/src/client/targets.cc @@ -517,7 +517,8 @@ void frame() float myz = math::distance(cursor_aim, entity->location()); if (z < 0 || myz < z) { current_hover = entity->id(); - aim_distance = math::distance(render::Camera::eye(), entity->location()); + // aim slightly behind target to prevent colliding projectiles + aim_distance = entity->radius() + math::distance(render::Camera::eye(), entity->location()); z = myz; } } -- cgit v1.2.3