mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00: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:
parent
fe8ef1be59
commit
076c5ee223
5 changed files with 27 additions and 27 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue