From afb628f9cdcf7cbe107b9e5de545946cc6388baf Mon Sep 17 00:00:00 2001 From: darkrose Date: Tue, 16 Jun 2015 21:32:01 +1000 Subject: [PATCH] use red crosshair instead of selection box when pointing at mobs --- src/content_cao.h | 2 +- src/game.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/content_cao.h b/src/content_cao.h index cd43732..e8ee03c 100644 --- a/src/content_cao.h +++ b/src/content_cao.h @@ -212,7 +212,7 @@ public: { m_camera_offset = camera_offset; } - //bool doShowSelectionBox(){return false;} + bool doShowSelectionBox(){return false;} // If returns true, punch will not be sent to the server bool directReportPunch(content_t punch_item, v3f dir); diff --git a/src/game.cpp b/src/game.cpp index 44e163a..a9c7c8c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -902,7 +902,10 @@ void draw_hud( // crosshair if (crosshair) { - const video::SColor color(220,255,255,255); + u8 gb = 255; + if (crosshair > 2) + gb = 0; + const video::SColor color(220,255,gb,gb); const video::SColor colors[] = {color,color,color,color}; std::string tex(""); if (crosshair == 1) { @@ -3008,8 +3011,11 @@ void the_game( crosshair = 0; }else{ client.setFormState(false); - if (client.getPointedContent() != CONTENT_IGNORE) + if (client.getPointedContent() != CONTENT_IGNORE) { crosshair = 2; + if (!has_selected_node) + crosshair = 3; + } } MapNode snode; v3s16 spos = v3s16(0,0,0);