1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Show status message when changing block bounds (#11556)

This commit is contained in:
Wuzzy
2021-08-21 11:53:49 +00:00
committed by GitHub
parent e7b05beb7d
commit 6fd8aede48
3 changed files with 30 additions and 12 deletions

View File

@@ -857,13 +857,14 @@ void Hud::drawSelectionMesh()
}
}
void Hud::toggleBlockBounds()
enum Hud::BlockBoundsMode Hud::toggleBlockBounds()
{
m_block_bounds_mode = static_cast<BlockBoundsMode>(m_block_bounds_mode + 1);
if (m_block_bounds_mode >= BLOCK_BOUNDS_MAX) {
m_block_bounds_mode = BLOCK_BOUNDS_OFF;
}
return m_block_bounds_mode;
}
void Hud::disableBlockBounds()
@@ -890,7 +891,7 @@ void Hud::drawBlockBounds()
v3f offset = intToFloat(client->getCamera()->getOffset(), BS);
s8 radius = m_block_bounds_mode == BLOCK_BOUNDS_ALL ? 2 : 0;
s8 radius = m_block_bounds_mode == BLOCK_BOUNDS_NEAR ? 2 : 0;
v3f halfNode = v3f(BS, BS, BS) / 2.0f;