aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-06-27 07:30:02 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-06-27 07:30:02 +0300
commitab0cc1bb4726a393a46f638b2de29b6569bbc9e5 (patch)
tree4ca0578a23212155b300e513804b62b818fda2a2
parentcf9a1f0109b81f8853976708be0567fa9b840f98 (diff)
downloadminetest-ab0cc1bb4726a393a46f638b2de29b6569bbc9e5.tar.gz
minetest-ab0cc1bb4726a393a46f638b2de29b6569bbc9e5.tar.bz2
minetest-ab0cc1bb4726a393a46f638b2de29b6569bbc9e5.zip
better handling of unknown blocks on client
-rw-r--r--data/unknown_block.pngbin0 -> 582 bytes
-rw-r--r--src/mapnode.cpp12
2 files changed, 12 insertions, 0 deletions
diff --git a/data/unknown_block.png b/data/unknown_block.png
new file mode 100644
index 000000000..a27cb8ca9
--- /dev/null
+++ b/data/unknown_block.png
Binary files differ
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index dae21e7cc..7e2643987 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -139,6 +139,18 @@ void init_mapnode()
}
/*
+ Initially set every block to be shown as an unknown block.
+ Don't touch CONTENT_IGNORE or CONTENT_AIR.
+ */
+ for(u16 i=0; i<=253; i++)
+ {
+ ContentFeatures *f = &g_content_features[i];
+ f->setAllTextures("unknown_block.png");
+ f->setInventoryTextureCube("unknown_block.png", "unknown_block.png", "unknown_block.png");
+ f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
+ }
+
+ /*
Initialize mapnode content
*/
content_mapnode_init();