diff options
Diffstat (limited to 'src/client/targets.cc')
-rw-r--r-- | src/client/targets.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |