Jump to conversation
Unresolved conversations (6)
@appgurueu appgurueu Jan 22, 2022
I don't like how this silently aborts if the start is out of bounds. It should do the same clamping as is done for the end.
src/environment.cpp
@sfan5 sfan5 Dec 6, 2021
this is already assured
src/environment.cpp
appgurueu savilli
SmallJoker
@erlehmann erlehmann Dec 4, 2021
Again, these should probably be s16 bounds.
Outdated
src/unittest/test_voxelalgorithms.cpp
@erlehmann erlehmann Dec 4, 2021
Again, these should probably be s16 bounds.
Outdated
src/unittest/test_voxelalgorithms.cpp
@erlehmann erlehmann Dec 4, 2021
Why not start directly at the s16 boundary ±1? 40k is a bit far away.
Outdated
src/unittest/test_voxelalgorithms.cpp
@sfan5 sfan5 Dec 4, 2021
IMO the warning here is not needed. More importantly, should this really abort the entire raycast? A raycast could start outside the map but still hit something valid. It might be better to clip the coordinates to the first point of the ray that is inside the map ([like this I guess?](https://webcache.googleusercontent.com/search?q=cache:UA4_BJV5AzcJ:https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-box-intersection))
Outdated
src/environment.cpp
erlehmann savilli
SmallJoker
Resolved conversations (5)
@SmallJoker SmallJoker Dec 8, 2021
Would you please be so nice to add a comment here to describe what the main idea of this calculation is, and what the variables indicate? It seems to be some sort of area size comparison...
src/environment.cpp
savilli
@SmallJoker SmallJoker Dec 8, 2021
FWIW, this is already ensured by the default constructor of the class.
Outdated
src/voxelalgorithms.h
savilli
@sfan5 sfan5 Dec 6, 2021
1000000? what? why?
Outdated
src/environment.cpp
savilli SmallJoker
@savilli savilli Dec 4, 2021
Welp that approach doesn't work. Raycast vector would have a wrong angle. Guess I will accurately adopt SmallJoker's approach.
Outdated
src/voxelalgorithms.cpp
@erlehmann erlehmann Dec 4, 2021
`objectpos_over_limit()` relies on MAX_MAP_GENERATION_LIMIT a.k.a. 31000, which is not the actual world size limit in vanilla minetest (it is trivial to have nodes – even visible nodes – beyond that limit). To prevent raycasts not working inside the visible part of the map, the code should use the boundaries of a signed 16 bit integer instead. Otherwise you get bugs like https://github.com/minetest/minetest/issues/11828 again by fixing this.
Outdated
src/environment.cpp
erlehmann sfan5
savilli