diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 1645c65..d7789e9 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -1342,7 +1342,8 @@ public: //updateLegRot(dtime); //updateNodePos(); } - else if(m_prop.visual == "cube"){ + else if(m_prop.visual == "cube") + { infostream<<"GenericCAO::addToScene(): cube"<addMeshSceneNode(mesh, NULL); @@ -1353,7 +1354,9 @@ public: m_prop.visual_size.X)); u8 li = m_last_light; setMeshColor(m_meshnode->getMesh(), video::SColor(255,li,li,li)); - } else if(m_prop.visual == "wielditem"){ + } + else if(m_prop.visual == "wielditem") + { infostream<<"GenericCAO::addToScene(): node"<= 1){ @@ -1362,7 +1365,7 @@ public: ItemStack item(m_prop.textures[0], 1, 0, "", idef); scene::IMesh *mesh = item.getDefinition(idef).wield_mesh; m_meshnode = smgr->addMeshSceneNode(mesh, NULL); - + m_meshnode->setScale(v3f(m_prop.visual_size.X/2, m_prop.visual_size.Y/2, m_prop.visual_size.X/2)); @@ -1391,13 +1394,16 @@ public: updateTextures(""); scene::ISceneNode *node = NULL; - if(m_spritenode){ + if(m_spritenode) + { node = m_spritenode; } - else if(m_meshnode){ + else if(m_meshnode) + { node = m_meshnode; } - if(m_is_player && !m_is_local_player && (m_head || node)){ + if(m_is_player && !m_is_local_player && (m_head || node)) + { // Add a text node for showing the name gui::IGUIEnvironment* gui = irr->getGUIEnvironment(); std::wstring wname = narrow_to_wide(m_name); diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp index 8bfdc7d..7946cd9 100644 --- a/src/content_mapblock.cpp +++ b/src/content_mapblock.cpp @@ -675,7 +675,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data, }; v3f move_torch(0,0,0); - int xyrotation = 0; + int xyrotation = 180; int yzrotation = 0; for(s32 i=0; i<4; i++) { @@ -880,7 +880,8 @@ void mapblock_mesh_generate_special(MeshMakeData *data, p2.X++; MapNode n2 = data->m_vmanip.getNodeNoEx(blockpos_nodes + p2); const ContentFeatures *f2 = &nodedef->get(n2); - if(f2->drawtype == NDT_FENCELIKE) + //if(f2->drawtype == NDT_FENCELIKE) + if(f2->walkable) { aabb3f bar(-bar_len+BS/2,-bar_rad+BS/4,-bar_rad, bar_len+BS/2,bar_rad+BS/4,bar_rad); @@ -906,7 +907,8 @@ void mapblock_mesh_generate_special(MeshMakeData *data, p2.Z++; n2 = data->m_vmanip.getNodeNoEx(blockpos_nodes + p2); f2 = &nodedef->get(n2); - if(f2->drawtype == NDT_FENCELIKE) + //if(f2->drawtype == NDT_FENCELIKE) + if(f2->walkable) { aabb3f bar(-bar_rad,-bar_rad+BS/4,-bar_len+BS/2, bar_rad,bar_rad+BS/4,bar_len+BS/2);