1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Revert "Optimize raycast performance (#15233)"

This reverts commit f7a695c212.
This commit is contained in:
Lars Müller 2024-12-14 18:50:21 +01:00
parent 52a6673dab
commit f99a1a7c7c
4 changed files with 0 additions and 25 deletions

View file

@ -163,8 +163,6 @@ void Environment::continueRaycast(RaycastState *state, PointedThing *result_p)
break; // About to go out of bounds
}
const v3s16 pos_on_ray = state->m_iterator.m_current_node_pos;
// For each untested node
for (s16 z = new_nodes.MinEdge.Z; z <= new_nodes.MaxEdge.Z; z++)
for (s16 y = new_nodes.MinEdge.Y; y <= new_nodes.MaxEdge.Y; y++)
@ -177,10 +175,6 @@ void Environment::continueRaycast(RaycastState *state, PointedThing *result_p)
if (!is_valid_position)
continue;
// Optimization: Skip non-oversized selection boxes for other positions.
if ((pos_on_ray != np) && !nodedef->get(n).has_big_selection_box)
continue;
PointabilityType pointable = isPointableNode(n, nodedef,
state->m_liquids_pointable,
state->m_pointabilities);