1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add option to disable entity selectionboxes. (#3992)

Setting only loaded once, default value is to enable them.
This commit is contained in:
TriBlade9 2016-04-14 02:15:41 -07:00 committed by est31
parent b5f6d41eed
commit 6530ed4dd8
5 changed files with 13 additions and 1 deletions

View file

@ -329,6 +329,8 @@ PointedThing getPointedThing(Client *client, Hud *hud, const v3f &player_positio
std::vector<aabb3f> *selectionboxes = hud->getSelectionBoxes();
selectionboxes->clear();
static const bool show_entity_selectionbox = g_settings->getBool("show_entity_selectionbox");
selected_object = NULL;
INodeDefManager *nodedef = client->getNodeDefManager();
@ -342,7 +344,8 @@ PointedThing getPointedThing(Client *client, Hud *hud, const v3f &player_positio
camera_position, shootline);
if (selected_object != NULL) {
if (selected_object->doShowSelectionBox()) {
if (show_entity_selectionbox &&
selected_object->doShowSelectionBox()) {
aabb3f *selection_box = selected_object->getSelectionBox();
// Box should exist because object was
// returned in the first place