From a48a0e77eb48a0afe8b2d66f3f5ea75e39b9d504 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 15 Nov 2011 15:32:09 +0200 Subject: Prepare more for node definition serialization --- src/content_mapblock.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'src/content_mapblock.cpp') diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp index 7ce4f2df4..e0a9b60f9 100644 --- a/src/content_mapblock.cpp +++ b/src/content_mapblock.cpp @@ -366,15 +366,16 @@ void mapblock_mesh_generate_special(MeshMakeData *data, */ else if(nodedef->get(n).liquid_type == LIQUID_FLOWING) { - assert(nodedef->get(n).special_material); + assert(nodedef->get(n).special_materials[0]); + assert(nodedef->get(n).special_materials[1]); + assert(nodedef->get(n).special_aps[0]); + video::SMaterial &liquid_material = - *nodedef->get(n).special_material; + *nodedef->get(n).special_materials[0]; video::SMaterial &liquid_material_bfculled = - *nodedef->get(n).special_material2; - - assert(nodedef->get(n).special_atlas); + *nodedef->get(n).special_materials[1]; AtlasPointer &pa_liquid1 = - *nodedef->get(n).special_atlas; + *nodedef->get(n).special_aps[0]; bool top_is_same_liquid = false; MapNode ntop = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(x,y+1,z)); @@ -661,12 +662,16 @@ void mapblock_mesh_generate_special(MeshMakeData *data, else if(nodedef->get(n).liquid_type == LIQUID_SOURCE && new_style_water) { - assert(nodedef->get(n).special_material); + assert(nodedef->get(n).special_materials[0]); + //assert(nodedef->get(n).special_materials[1]); + assert(nodedef->get(n).special_aps[0]); + video::SMaterial &liquid_material = - *nodedef->get(n).special_material; - assert(nodedef->get(n).special_atlas); + *nodedef->get(n).special_materials[0]; + /*video::SMaterial &liquid_material_bfculled = + *nodedef->get(n).special_materials[1];*/ AtlasPointer &pa_liquid1 = - *nodedef->get(n).special_atlas; + *nodedef->get(n).special_aps[0]; bool top_is_air = false; MapNode n = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(x,y+1,z)); -- cgit v1.2.3