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/view.cc')
-rw-r--r--src/client/view.cc31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 6d3f456..d796655 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -190,21 +190,32 @@ void draw_cursor()
float crosshair_size = 48.0f;
float x = input::mouse_x - (crosshair_size /2);
float y = input::mouse_y - (crosshair_size /2);
-// 0
+
using namespace render;
- render::Textures::bind("bitmaps/crosshair");
+
math::Color color;
- if (cl_crosshaircolor && cl_crosshaircolor->value()) {
- std::stringstream colorstr(cl_crosshaircolor->str());
- colorstr >> color;
- }
+ color.a = 0.5f;
- if (cl_mousecontrol->value() && input::mouse_deadzone)
- color.a = 0.3f;
- else
- color.a = 0.5f;
+ if (render::Camera::mode() == render::Camera::Overview) {
+ render::Textures::bind("bitmaps/crosshairs/aim");
+
+ } else {
+
+ if (input::mouse_control) {
+ render::Textures::bind("bitmaps/crosshairs/control");
+
+ if (cl_crosshaircolor && cl_crosshaircolor->value()) {
+ std::stringstream colorstr(cl_crosshaircolor->str());
+ colorstr >> color;
+ }
+ } else {
+
+ render::Textures::bind("bitmaps/crosshairs/aim");
+ }
+
+ }
gl::color(color);
gl::begin(gl::Quads);