1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-17 14:55:13 -05:00

Bugfix: dont highlight (0,0,0) when theres no node pointed.

This commit is contained in:
RealBadAngel 2014-10-03 16:03:14 +02:00
parent 0920f55eb4
commit b9cb196d49

View File

@ -2786,8 +2786,13 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
if(pointed != pointed_old) if(pointed != pointed_old)
{ {
infostream<<"Pointing at "<<pointed.dump()<<std::endl; infostream<<"Pointing at "<<pointed.dump()<<std::endl;
if (g_settings->getBool("enable_node_highlighting")) if (g_settings->getBool("enable_node_highlighting")) {
client.setHighlighted(pointed.node_undersurface, show_hud); if (pointed.type == POINTEDTHING_NODE) {
client.setHighlighted(pointed.node_undersurface, show_hud);
} else {
client.setHighlighted(pointed.node_undersurface, false);
}
}
} }
/* /*