-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix garage door knockback crash #36671
Conversation
Never mind, this was just tested by anothersimulacrum who can repro the crash reliably, and its still crashing for them. |
Reopened as @anothersimulacrum has been assisting me with finding the real problem here for the real fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works correctly when I try it locally.
This has a teensy bug, it'll now prefer flinging in specific directions instead of it being random. |
Take a look at random_point() for how to pick a random point filtered by criteria. |
yup, added that now. |
Summary
SUMMARY: Bugfixes "Fix garage door knockback crash"
Purpose of change
Fixes #34963
Describe the solution
knockback() was passed two points from from
forced_door_closing()
though in some circumstances, that could pass two identical points, which caused crashes in slope_from() in line.cpp.Used points_in_radius() instead of the previous rng method, and added checking for two identical points.
Describe alternatives you've considered
N/A
Testing
I cant actually reproduce the issue myself, but anothersimulacrum and others have been able to and they have tested this change.
Additional context
N/A