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

Fixed overlapping vehicle parts check #37079

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

ipcyborg
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fixed overlapping vehicle parts check"

Purpose of change

Fixes #36638

Describe the solution

Rearranged condition check in vehicle::smash to make it correctly check overlapping parts with no location specified (like vehicle controls).
For example, see similar check in vehicle::can_mount.

Describe alternatives you've considered

None

Testing

Tested like described in #36638: no controls was destroyed immediately. Some damage starts to accumulate after a few juggernaut's smashes (usually on the outer parts first).
Looks correct.

cata_test-tiles - all tests passed

Additional context

None

@curstwist curstwist added <Bugfix> This is a fix for a bug (or closes open issue) Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 16, 2020
@ZhilkinSerg ZhilkinSerg merged commit de7416a into CleverRaven:master Jan 16, 2020
@ipcyborg ipcyborg deleted the fix-36638-smash-vehicle branch January 16, 2020 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vehicle controls are disappearing when a skeletal juggernaut shoves a vehicle
3 participants