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

testLineAgainstWater crash fix #836

Merged

Conversation

forkerer
Copy link
Contributor

Fixes #835
This pull request prevents game crash in some circumstances where new testLineAgainstWater is used. The issue lies in CWaterManagerSA::GetZonesIntersecting, in some cases when the line checked lies near world boundary, it will try to access zone that lies outside of it. While I don't yet know why it happens, and probably should look into another algorithm for checking which grid cells line travels through, this additional check mitigates the issue.

@forkerer forkerer added the bug Something isn't working label Feb 23, 2019
@patrikjuvonen patrikjuvonen self-assigned this Feb 23, 2019
@patrikjuvonen patrikjuvonen added this to the 1.5.7 milestone Feb 23, 2019
@patrikjuvonen patrikjuvonen merged commit b9258a1 into multitheftauto:master Feb 23, 2019
@patrikjuvonen
Copy link
Contributor

Thank you for the crash fix. I agree we should have a more long-term solution for this, I too feel a boundary check should be unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants