From 1a28393dabf4f4696bf433ddde52e7a25253c955 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 16 Oct 2008 16:34:15 +0000 Subject: various user interface related updates --- src/client/targets.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/targets.cc') diff --git a/src/client/targets.cc b/src/client/targets.cc index b533974..c7fcf9e 100644 --- a/src/client/targets.cc +++ b/src/client/targets.cc @@ -413,8 +413,8 @@ void draw() x = 0; y = 0; } else { - x = (float)(input::mouse_position_x() - video::width /2) / (float)video::width; - y = (float)(input::mouse_position_y() - video::height /2) / (float)video::height / render::Camera::aspect(); + x = (float)(input::mouse_position_x() - render::Camera::width() /2) / (float)render::Camera::width(); + y = (float)(input::mouse_position_y() - render::Camera::height() /2) / (float)render::Camera::height() / render::Camera::aspect(); } Vector3f cursor = render::Camera::eye() + render::Camera::axis().forward() * (render::Camera::frustum_front() + 0.001); -- cgit v1.2.3