mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +02:00
more readable code
This commit is contained in:
parent
3f1944eb8a
commit
858b02f29d
1 changed files with 2 additions and 2 deletions
|
@ -601,8 +601,8 @@ EntityItemID EntityTreeElement::findRayIntersection(const glm::vec3& origin, con
|
|||
|
||||
// if the ray doesn't intersect with our cube OR the distance to element is less than current best distance
|
||||
// we can stop searching!
|
||||
if (!_cube.findRayIntersection(origin, direction, distanceToElementCube, localFace, localSurfaceNormal)
|
||||
|| (!_cube.contains(origin) && distanceToElementCube > distance)) {
|
||||
bool hit = _cube.findRayIntersection(origin, direction, distanceToElementCube, localFace, localSurfaceNormal);
|
||||
if (!hit || (!_cube.contains(origin) && distanceToElementCube > distance)) {
|
||||
keepSearching = false; // no point in continuing to search
|
||||
return result; // we did not intersect
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue