aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-10-03 16:03:14 +0200
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-10-03 16:03:14 +0200
commitb9cb196d494c60016a509ffe17ce2077e98ceac6 (patch)
tree7c9de529a822ddf4747f69e15540abb7e38bb067 /src/game.cpp
parent0920f55eb4224fdac1dfb363ef0864fc26162406 (diff)
downloadminetest-b9cb196d494c60016a509ffe17ce2077e98ceac6.tar.gz
minetest-b9cb196d494c60016a509ffe17ce2077e98ceac6.tar.bz2
minetest-b9cb196d494c60016a509ffe17ce2077e98ceac6.zip
Bugfix: dont highlight (0,0,0) when theres no node pointed.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files 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 "<<pointed.dump()<<std::endl;
- if (g_settings->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);
+ }
+ }
}
/*