aboutsummaryrefslogtreecommitdiff
path: root/src/content_mapblock.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-10-07 17:01:07 +1000
committerKahrl <kahrl@gmx.net>2014-10-19 15:33:08 +0200
commit076c5ee2234c7f217f8941bbbd710d317485ccbc (patch)
treed59d05cf111a7fb79960878a9d51864ea6ff5b97 /src/content_mapblock.cpp
parentfe8ef1be59399a327d9df50a0ab823bb2731de79 (diff)
downloadminetest-076c5ee2234c7f217f8941bbbd710d317485ccbc.tar.gz
minetest-076c5ee2234c7f217f8941bbbd710d317485ccbc.tar.bz2
minetest-076c5ee2234c7f217f8941bbbd710d317485ccbc.zip
Various uninitialised variable fixes
sky.cpp: m_bgcolor.getAlpha() was being used before initialised mesh related: m_highlight_mesh_color was being used uninitialised
Diffstat (limited to 'src/content_mapblock.cpp')
-rw-r--r--src/content_mapblock.cpp10
1 files changed, 5 insertions, 5 deletions
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<aabb3f> boxes = n.getSelectionBoxes(nodedef);
TileSpec h_tile;
h_tile.material_flags |= MATERIAL_FLAG_HIGHLIGHTED;