]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/gameui.cpp
Add object visual type 'item' (#7870)
[minetest.git] / src / client / gameui.cpp
index 84b6ef2d3872a37e558664e253d7a8f2f3bab3aa..1f433e49a261436dc01333a6626ebbcf118d67f3 100644 (file)
@@ -33,7 +33,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 inline static const char *yawToDirectionString(int yaw)
 {
-       static const char *direction[4] = {"N +Z", "W -X", "S -Z", "E +X"};
+       static const char *direction[4] =
+               {"North +Z", "West -X", "South -Z", "East +X"};
 
        yaw = wrapDegrees_0_360(yaw);
        yaw = (yaw + 45) % 360 / 90;
@@ -131,7 +132,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
 
                if (pointed_old.type == POINTEDTHING_NODE) {
                        ClientMap &map = client->getEnv().getClientMap();
-                       const INodeDefManager *nodedef = client->getNodeDefManager();
+                       const NodeDefManager *nodedef = client->getNodeDefManager();
                        MapNode n = map.getNodeNoEx(pointed_old.node_undersurface);
 
                        if (n.getContent() != CONTENT_IGNORE && nodedef->get(n).name != "unknown") {
@@ -188,9 +189,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
 
 void GameUI::initFlags()
 {
-       memset(&m_flags, 0, sizeof(GameUI::Flags));
-       m_flags.show_chat = true;
-       m_flags.show_hud = true;
+       m_flags = GameUI::Flags();
        m_flags.show_debug = g_settings->getBool("show_debug");
 }