From: Perttu Ahola Date: Mon, 27 Jun 2011 04:30:02 +0000 (+0300) Subject: better handling of unknown blocks on client X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=ab0cc1bb4726a393a46f638b2de29b6569bbc9e5;p=zefram%2Fminetest%2Fminetest_engine.git better handling of unknown blocks on client --- diff --git a/data/unknown_block.png b/data/unknown_block.png new file mode 100644 index 00000000..a27cb8ca Binary files /dev/null and b/data/unknown_block.png differ diff --git a/src/mapnode.cpp b/src/mapnode.cpp index dae21e7c..7e264398 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -138,6 +138,18 @@ void init_mapnode() f->tiles[j].material_type = initial_material_type; } + /* + 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 */