diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-04 16:22:56 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-04 16:52:41 +0100 |
commit | e56497a9a9e66fc912aadc79e979f51a7f6fe81c (patch) | |
tree | 068fa3a9c7607a6cffc52772c0bb95f9d217134f /src | |
parent | 5276878b10447c696d28a8f9c5d8c2d0fef81c30 (diff) |
fix evil typo slowing down raycast
Diffstat (limited to 'src')
-rw-r--r-- | src/raycast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/raycast.cpp b/src/raycast.cpp index 9789ec2f..b6ed2158 100644 --- a/src/raycast.cpp +++ b/src/raycast.cpp @@ -191,6 +191,9 @@ raycast_result_s do_raycasting(std::conditional_t<EnableDiagnostics, raycast_dia float min_tmin = FLT_MAX; bool b = true; + auto last_ch = from.chunk3(); + std::array<std::array<chunk*, 3>, 3> nbs = {}; + //Debug{} << "------"; for (unsigned k = 0; b && k <= nsteps; k++) { @@ -256,9 +259,6 @@ raycast_result_s do_raycasting(std::conditional_t<EnableDiagnostics, raycast_dia if constexpr(EnableDiagnostics) arrayAppend(diag.path, bbox{center, size}); - auto last_ch = from.chunk3(); - std::array<std::array<chunk*, 3>, 3> nbs = {}; - if (center.chunk3() != last_ch) [[unlikely]] { last_ch = center.chunk3(); |