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-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=ff1ae29f97a9923c54655dd05a2dc394ee151b34;p=zefram%2Fminetest%2Fminetest_engine.git Duplicate last tile image automatically to all for lua node definitions --- diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 6f16c72e..5ef4f997 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);