diff options
author | Wuzzy <Wuzzy@disroot.org> | 2022-04-28 16:51:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 18:51:46 +0200 |
commit | 7f4fc6f8a77cd0e454ce98ff92da8c8d6592afba (patch) | |
tree | 5fdfe4cf975e06c077689d097b1e04c0c83d0f71 /src/client | |
parent | a2f13e479b536f67e59a71714fec5f97a74b5dea (diff) | |
download | minetest-7f4fc6f8a77cd0e454ce98ff92da8c8d6592afba.tar.gz minetest-7f4fc6f8a77cd0e454ce98ff92da8c8d6592afba.tar.bz2 minetest-7f4fc6f8a77cd0e454ce98ff92da8c8d6592afba.zip |
Show unknown node in debug screen (#12230)
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/gameui.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index 8505ea3ae..01c733b4f 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -151,9 +151,13 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ const NodeDefManager *nodedef = client->getNodeDefManager(); MapNode n = map.getNode(pointed_old.node_undersurface); - if (n.getContent() != CONTENT_IGNORE && nodedef->get(n).name != "unknown") { - os << ", pointed: " << nodedef->get(n).name - << ", param2: " << (u64) n.getParam2(); + if (n.getContent() != CONTENT_IGNORE) { + if (nodedef->get(n).name == "unknown") { + os << ", pointed: <unknown node>"; + } else { + os << ", pointed: " << nodedef->get(n).name; + } + os << ", param2: " << (u64) n.getParam2(); } } |