Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/targets.cc')
-rw-r--r--src/client/targets.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/targets.cc b/src/client/targets.cc
index 04a4463..8b77644 100644
--- a/src/client/targets.cc
+++ b/src/client/targets.cc
@@ -25,6 +25,7 @@
#include "math/axis.h"
#include "math/vector3f.h"
#include "render/camera.h"
+#include "render/state.h"
namespace client {
@@ -413,8 +414,8 @@ void draw()
x = 0;
y = 0;
} else {
- 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();
+ x = (float)(input::mouse_position_x() - render::State::width() /2) / (float)render::State::width();
+ y = (float)(input::mouse_position_y() - render::State::height() /2) / (float)render::State::height() / render::State::aspect();
}
Vector3f cursor = render::Camera::eye() + render::Camera::axis().forward() * (render::Camera::frustum_front() + 0.001);