From b9cb196d494c60016a509ffe17ce2077e98ceac6 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Fri, 3 Oct 2014 16:03:14 +0200 Subject: [PATCH] Bugfix: dont highlight (0,0,0) when theres no node pointed. --- src/game.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index a8f6bc992..12bc695a6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2786,8 +2786,13 @@ void the_game(bool &kill, bool random_input, InputHandler *input, if(pointed != pointed_old) { infostream<<"Pointing at "<getBool("enable_node_highlighting")) - client.setHighlighted(pointed.node_undersurface, show_hud); + if (g_settings->getBool("enable_node_highlighting")) { + if (pointed.type == POINTEDTHING_NODE) { + client.setHighlighted(pointed.node_undersurface, show_hud); + } else { + client.setHighlighted(pointed.node_undersurface, false); + } + } } /* -- 2.25.1