1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Add a key to toggle map block bounds (#11172)

It's often useful to know where the map block boundaries are for doing server admin work and the like.
Adds three modes: single mapblock, range of 5, and disabled.
This commit is contained in:
Seth Traverse 2021-04-20 10:23:31 -07:00 committed by GitHub
parent 0077982fb7
commit 16e5b39e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 100 additions and 33 deletions

View file

@ -59,6 +59,9 @@ public:
Inventory *inventory);
~Hud();
void toggleBlockBounds();
void drawBlockBounds();
void drawHotbar(u16 playeritem);
void resizeHotbar();
void drawCrosshair();
@ -125,6 +128,14 @@ private:
scene::SMeshBuffer m_rotation_mesh_buffer;
enum BlockBoundsMode
{
BLOCK_BOUNDS_OFF,
BLOCK_BOUNDS_CURRENT,
BLOCK_BOUNDS_ALL,
BLOCK_BOUNDS_MAX
} m_block_bounds_mode = BLOCK_BOUNDS_OFF;
enum
{
HIGHLIGHT_BOX,