Skip to content

Commit b9cb196

Browse files
committedOct 3, 2014
Bugfix: dont highlight (0,0,0) when theres no node pointed.
1 parent 0920f55 commit b9cb196

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎src/game.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -2786,8 +2786,13 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
27862786
if(pointed != pointed_old)
27872787
{
27882788
infostream<<"Pointing at "<<pointed.dump()<<std::endl;
2789-
if (g_settings->getBool("enable_node_highlighting"))
2790-
client.setHighlighted(pointed.node_undersurface, show_hud);
2789+
if (g_settings->getBool("enable_node_highlighting")) {
2790+
if (pointed.type == POINTEDTHING_NODE) {
2791+
client.setHighlighted(pointed.node_undersurface, show_hud);
2792+
} else {
2793+
client.setHighlighted(pointed.node_undersurface, false);
2794+
}
2795+
}
27912796
}
27922797

27932798
/*

1 commit comments

Comments
 (1)

napodan commented on Nov 6, 2014

@napodan

Hi, I have something weird with this commit :

If the node 0,0,0 is water, I have nothing in that position. You can try with minetest_game, seed 123456789. Teleport in 1,0,-1. Wait until water fill the air. You will have a "blank" node in 0,0,0.

Please sign in to comment.