diff options
-rw-r--r-- | src/client/targets.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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; } } |