1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Add object crosshair, disable entity selectionboxes by default (#9523)

Adds new object crosshair base pack texture
This commit is contained in:
LoneWolfHT 2020-07-14 10:12:17 -07:00 committed by SmallJoker
parent 4fa1e03f68
commit 88ffd64124
8 changed files with 55 additions and 10 deletions

View file

@ -3176,11 +3176,14 @@ PointedThing Game::updatePointedThing(
const NodeDefManager *nodedef = map.getNodeDefManager();
runData.selected_object = NULL;
hud->pointing_at_object = false;
RaycastState s(shootline, look_for_object, liquids_pointable);
PointedThing result;
env.continueRaycast(&s, &result);
if (result.type == POINTEDTHING_OBJECT) {
hud->pointing_at_object = true;
runData.selected_object = client->getEnv().getActiveObject(result.object_id);
aabb3f selection_box;
if (show_entity_selectionbox && runData.selected_object->doShowSelectionBox() &&