Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-01-27 23:10:27 +0000
committerStijn Buys <ingar@osirion.org>2013-01-27 23:10:27 +0000
commitc0d374ec657dd7824c47c9884943af19365b0fde (patch)
tree7dec63abf7ce58e712b8f1df6f66e9e795b1bee2 /src/client/targets.cc
parent341febfa2be738eb231c878b6b16fd13d420ca2b (diff)
Improved aim on nearby targets.
Diffstat (limited to 'src/client/targets.cc')
-rw-r--r--src/client/targets.cc3
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;
}
}