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

refactor ai_mission_goal_achievable #5667

Merged

Conversation

Goober5000
Copy link
Contributor

Change ai_mission_goal_achievable to use the ship registry instead of looking up the target repeatedly.

@Goober5000 Goober5000 added 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 Oct 5, 2023
Change `ai_mission_goal_achievable` to use the ship registry instead of looking up the target repeatedly.
@Goober5000 Goober5000 force-pushed the refactor_mission_goal_achievable branch from abda759 to f98806b Compare October 6, 2023 03:20
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Oct 6, 2023
The ai-fly-to-ship goal was added early in FSO's development but never worked right.  Until recently it crashed, and after the crash was fixed the AI would try to reach the target's exact position, causing repeated collisions.  This folds ai-fly-to-ship into ai-stay-near-ship, since the behaviors are conceptually the same except for fly-to being satisfied as soon as the target is in range.

This also adds a new "escort" mode usable by both behaviors.  The default Volition behavior is to swoop toward the target in a long, graceful arc; the new mode generates a goal point and flies directly to that point.  These can be toggled via an optional sexp parameter.

There is also some minor cleanup and a new vec3d operator for convenience.

Needed for Scroll; depends on scp-fs2open#5667.
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Oct 6, 2023
The ai-fly-to-ship goal was added early in FSO's development but never worked right.  Until recently it could crash; and after the crash was fixed the AI would try to reach the target's exact position, causing repeated collisions.  This folds ai-fly-to-ship into ai-stay-near-ship, since the behaviors are conceptually the same except for fly-to being satisfied as soon as the target is in range.

This also adds a new "escort" mode usable by both behaviors.  The default Volition behavior is to swoop toward the target in a long, graceful arc; the new mode generates a goal point and flies directly to that point.  These can be toggled via an optional sexp parameter.

There is also some minor cleanup and a new vec3d operator for convenience.

Needed for Scroll; depends on scp-fs2open#5667.
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Oct 6, 2023
The ai-fly-to-ship goal was added early in FSO's development but never worked right.  Until recently it could crash; and even aside from the crash the AI would try to reach the target's exact position, causing repeated collisions.  This folds ai-fly-to-ship into ai-stay-near-ship, since the behaviors are conceptually the same except for fly-to being satisfied as soon as the target is in range.

This also adds a new "escort" mode usable by both behaviors.  The default Volition behavior is to swoop toward the target in a long, graceful arc; the new mode generates a goal point and flies directly to that point.  These can be toggled via an optional sexp parameter.

There is also some minor cleanup and a new vec3d operator for convenience.

Needed for Scroll; depends on scp-fs2open#5667.
@Goober5000 Goober5000 added Requested by Active Mod A feature request that has been requested by a mod that is actively in development. and removed Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle labels Oct 14, 2023
@Goober5000 Goober5000 merged commit d3383d9 into scp-fs2open:master Oct 16, 2023
@Goober5000 Goober5000 deleted the refactor_mission_goal_achievable branch October 16, 2023 07:23
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Oct 16, 2023
The ai-fly-to-ship goal was added early in FSO's development but never worked right.  Until recently it could crash; and even aside from the crash the AI would try to reach the target's exact position, causing repeated collisions.  This folds ai-fly-to-ship into ai-stay-near-ship, since the behaviors are conceptually the same except for fly-to being satisfied as soon as the target is in range.

This also adds a new "escort" mode usable by both behaviors.  The default Volition behavior is to swoop toward the target in a long, graceful arc; the new mode generates a goal point and flies directly to that point.  These can be toggled via an optional sexp parameter.

There is also some minor cleanup and a new vec3d operator for convenience.

Needed for Scroll; depends on scp-fs2open#5667.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability Requested by Active Mod A feature request that has been requested by a mod that is actively in development.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants