mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Various uninitialised variable fixes
sky.cpp: m_bgcolor.getAlpha() was being used before initialised mesh related: m_highlight_mesh_color was being used uninitialised
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user