mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Show unknown node in debug screen (#12230)
This commit is contained in:
parent
a2f13e479b
commit
7f4fc6f8a7
@ -151,9 +151,13 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
|
|||||||
const NodeDefManager *nodedef = client->getNodeDefManager();
|
const NodeDefManager *nodedef = client->getNodeDefManager();
|
||||||
MapNode n = map.getNode(pointed_old.node_undersurface);
|
MapNode n = map.getNode(pointed_old.node_undersurface);
|
||||||
|
|
||||||
if (n.getContent() != CONTENT_IGNORE && nodedef->get(n).name != "unknown") {
|
if (n.getContent() != CONTENT_IGNORE) {
|
||||||
os << ", pointed: " << nodedef->get(n).name
|
if (nodedef->get(n).name == "unknown") {
|
||||||
<< ", param2: " << (u64) n.getParam2();
|
os << ", pointed: <unknown node>";
|
||||||
|
} else {
|
||||||
|
os << ", pointed: " << nodedef->get(n).name;
|
||||||
|
}
|
||||||
|
os << ", param2: " << (u64) n.getParam2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user