mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Halo: Highlight selected face
This is a slightly modified and cleaned up version of #3774 by RealBadAngel. By sofar: Remove color change (just make it lighter) and some minor cleanups.
This commit is contained in:
parent
8a1a9fdc24
commit
68f5b877c7
6 changed files with 39 additions and 2 deletions
|
@ -362,6 +362,7 @@ PointedThing getPointedThing(Client *client, Hud *hud, const v3f &player_positio
|
|||
|
||||
min_distance = (selected_object->getPosition() - camera_position).getLength();
|
||||
|
||||
hud->setSelectedFaceNormal(v3f(0.0, 0.0, 0.0));
|
||||
result.type = POINTEDTHING_OBJECT;
|
||||
result.object_id = selected_object->getId();
|
||||
}
|
||||
|
@ -473,6 +474,7 @@ PointedThing getPointedThing(Client *client, Hud *hud, const v3f &player_positio
|
|||
if (!facebox.intersectsWithLine(shootline))
|
||||
continue;
|
||||
result.node_abovesurface = pointed_pos + facedir;
|
||||
hud->setSelectedFaceNormal(v3f(facedir.X, facedir.Y, facedir.Z));
|
||||
face_min_distance = distance;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue