Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fix to bounding-box logic #22

Closed
wants to merge 0 commits into from
Closed

Small fix to bounding-box logic #22

wants to merge 0 commits into from

Conversation

jnnnnn
Copy link
Contributor

@jnnnnn jnnnnn commented Sep 18, 2010

We need to include levels which are partly inside the bounding box...

@udoprog
Copy link
Owner

udoprog commented Sep 18, 2010

the xPos/zPos are already chunk specific coordinates, I think it's preferential to have the limits on the 16 block chunks, since this is also how coordinates are often reflected elsewhere (as spawning point by default is 60 south), but this should include the blocks, as you mentioned.

@jnnnnn
Copy link
Contributor Author

jnnnnn commented Sep 19, 2010

I can't test at the moment but I think the logic is wrong.

For example, if you request a slice a single block high with -L 2,2,2,2 then the unfixed logic will filter out all levels, because the relevant level coordinates (0,0,0,0) are "outside" the bounding box. The +1s on the level coordinates (before *mc::MapX etc.) ensure that the test includes levels that would otherwise be filtered out in this way.

@udoprog
Copy link
Owner

udoprog commented Sep 19, 2010

Yep, it should probably be limiting the way you are specifying, that's the most intuitive.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants