mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user