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

replace waypoint pointers with waypoint indexes #6359

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Goober5000
Copy link
Contributor

Several locations in the code (notably ai_info and waypoint_h) previously stored pointers for waypoints and waypoint lists that need to be valid for more than one frame. Since both waypoint lists and waypoint paths may change size, resulting in vector reallocation, the information should be stored as indexes instead.

Fixes #6353.

@Goober5000 Goober5000 added fix A fix for bugs, not-a-bugs, and/or regressions. gameplay A feature or issue that can significantly impact gameplay refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle labels Sep 18, 2024
@Goober5000 Goober5000 force-pushed the waypoint_pointer_to_index branch 9 times, most recently from 4b6c3b1 to de1569d Compare September 19, 2024 04:38
Several locations in the code (notably `ai_info` and `waypoint_h`) previously stored pointers for waypoints and waypoint lists that need to be valid for more than one frame.  Since both waypoint lists and waypoint paths may change size, resulting in vector reallocation, the information should be stored as indexes instead.

Fixes scp-fs2open#6353.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for bugs, not-a-bugs, and/or regressions. gameplay A feature or issue that can significantly impact gameplay refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when ai is ordered to fly waypoints created by scripting, since Nightly 23.3.0-20231103
1 participant