From 076c5ee2234c7f217f8941bbbd710d317485ccbc Mon Sep 17 00:00:00 2001 From: Craig Robbins Date: Tue, 7 Oct 2014 17:01:07 +1000 Subject: Various uninitialised variable fixes sky.cpp: m_bgcolor.getAlpha() was being used before initialised mesh related: m_highlight_mesh_color was being used uninitialised --- src/content_mapblock.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/content_mapblock.cpp') diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp index 53b9874d4..996db421b 100644 --- a/src/content_mapblock.cpp +++ b/src/content_mapblock.cpp @@ -188,10 +188,10 @@ void mapblock_mesh_generate_special(MeshMakeData *data, // Create selection mesh v3s16 p = data->m_highlighted_pos_relative; - if (data->m_show_hud & - (p.X >= 0) & (p.X < MAP_BLOCKSIZE) & - (p.Y >= 0) & (p.Y < MAP_BLOCKSIZE) & - (p.Z >= 0) & (p.Z < MAP_BLOCKSIZE)) { + if (data->m_show_hud && + (p.X >= 0) && (p.X < MAP_BLOCKSIZE) && + (p.Y >= 0) && (p.Y < MAP_BLOCKSIZE) && + (p.Z >= 0) && (p.Z < MAP_BLOCKSIZE)) { MapNode n = data->m_vmanip.getNodeNoEx(blockpos_nodes + p); if(n.getContent() != CONTENT_AIR) { @@ -215,7 +215,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data, l = l1; } video::SColor c = MapBlock_LightColor(255, l, 0); - data->m_highlight_mesh_color = c; + data->m_highlight_mesh_color = c; std::vector boxes = n.getSelectionBoxes(nodedef); TileSpec h_tile; h_tile.material_flags |= MATERIAL_FLAG_HIGHLIGHTED; -- cgit v1.2.3