Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-01-06 15:29:02 +0000
committerStijn Buys <ingar@osirion.org>2013-01-06 15:29:02 +0000
commitcf8ab544bcb394e71486a616d7e1efc35d0a26a0 (patch)
tree9e3d96b2ffcede271343bd1fd40d85b4c01d3225 /src
parent8a238b236ed89b31e21d6da7d1952eea6a29508e (diff)
Always aim at core::range::fx_distance.
Diffstat (limited to 'src')
-rw-r--r--src/client/targets.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/targets.cc b/src/client/targets.cc
index 8a7f402..1e5b831 100644
--- a/src/client/targets.cc
+++ b/src/client/targets.cc
@@ -384,16 +384,14 @@ void frame()
}
}
-
- float d = 64.0f; // default aim distance
+ cursor_aim = render::Camera::eye() + (cursor_aim - render::Camera::eye()) * core::range::fxdistance / math::distance(render::Camera::eye(), cursor_aim);
+
if (!current_target) {
current_target_id = 0;
} else {
current_target_id = current_target->id();
- d = math::distance(render::Camera::eye(), current_target->location());
}
- cursor_aim = render::Camera::eye() + (cursor_aim - render::Camera::eye()) / math::distance(render::Camera::eye(), cursor_aim) * d;
// set aim
if (core::localcontrol()) {