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

mapgen/remove_veh: remove from main map unconditionally #64002

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

andrei8l
Copy link
Contributor

@andrei8l andrei8l commented Mar 6, 2023

Summary

None

Purpose of change

remove_vehicles mapgen function can fail to clean up a target vehicle from the main map cache if the target OMT is rotated and right at the edge of the reality bubble

Describe the solution

Always remove the target vehicle from the main map cache since it's safe and fast.

Describe alternatives you've considered

Checking for OMT coordinate instead or accounting for rotation: no need; removal from cache is safe and fast.

Increasing the size of the reality bubble to an even number of submaps (so that it maps perfectly to OMTs) would also fix this.

Testing

Load save from #63995 and wait one turn. There should be no crash and the FM truck should have disappeared from the Public Washroom to the north.

Additional context

This should be backported to 0.G

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Map / Mapgen Overmap, Mapgen, Map extras, Map display <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Mar 6, 2023
andrei8l added 2 commits March 7, 2023 10:04
removal can otherwise fail if the target is a rotated OMT right at the
edge of the reality bubble
@github-actions github-actions bot added the Vehicles Vehicles, parts, mechanics & interactions label Mar 7, 2023
@dseguin dseguin merged commit cbbbaa1 into CleverRaven:master Mar 7, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 7, 2023
@andrei8l andrei8l deleted the remove_veh-omg branch March 8, 2023 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Something related to vehicles causing a crash.
2 participants