From: Perttu Ahola Date: Fri, 25 Nov 2011 16:57:17 +0000 (+0200) Subject: Duplicate last tile image automatically to all for lua node definitions X-Git-Tag: 0.4.dev-20111201-0~92 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ff1ae29f97a9923c54655dd05a2dc394ee151b34;p=oweals%2Fminetest.git Duplicate last tile image automatically to all for lua node definitions --- diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 6f16c72e7..5ef4f9972 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -529,6 +529,14 @@ static int l_register_node(lua_State *L) break; } } + // Copy last value to all remaining textures + if(i >= 1){ + std::string lastname = f.tname_tiles[i-1]; + while(i < 6){ + f.tname_tiles[i] = lastname; + i++; + } + } } lua_pop(L, 1);