From: RealBadAngel Date: Fri, 3 Oct 2014 14:03:14 +0000 (+0200) Subject: Bugfix: dont highlight (0,0,0) when theres no node pointed. X-Git-Tag: 0.4.11~240 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b9cb196d494c60016a509ffe17ce2077e98ceac6;p=oweals%2Fminetest.git Bugfix: dont highlight (0,0,0) when theres no node pointed. --- 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); + } + } } /*