diff options
author | Stijn Buys <ingar@osirion.org> | 2013-01-27 23:10:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-01-27 23:10:27 +0000 |
commit | c0d374ec657dd7824c47c9884943af19365b0fde (patch) | |
tree | 7dec63abf7ce58e712b8f1df6f66e9e795b1bee2 | |
parent | 341febfa2be738eb231c878b6b16fd13d420ca2b (diff) |
Improved aim on nearby targets.
-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; } } |