Duplicate last tile image automatically to all for lua node definitions

master
Perttu Ahola 2011-11-25 18:57:17 +02:00
parent fdf6eecd59
commit ff1ae29f97
1 changed files with 8 additions and 0 deletions

View File

@ -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);