Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()) {