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

fix chaotic player targeting in rare situations #6667

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

Goober5000
Copy link
Contributor

When the player's ship is under AI control and assigned a guard goal, this information would persist when the ship was returned to player control. This would cause the player's target to be randomly reassigned. To fix this, the AI state should be cleared when player AI is turned off.

Also change the Player_use_ai variable from int to bool.

Fixes a bug in Series Resurrecta, as well as potentially other bugs with other AI modes.

@Goober5000 Goober5000 added fix A fix for bugs, not-a-bugs, and/or regressions. ai A feature or issue related to the AI algorithms Requested by Active Mod A feature request that has been requested by a mod that is actively in development. labels Apr 6, 2025
@Goober5000 Goober5000 added this to the Release 25.0 milestone Apr 6, 2025
Copy link
Member

@wookieejedi wookieejedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward and good to have this bug fixed!

@Goober5000 Goober5000 merged commit 78b556a into scp-fs2open:master Apr 10, 2025
16 checks passed
@Goober5000 Goober5000 deleted the player_use_ai_fix branch April 10, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai A feature or issue related to the AI algorithms fix A fix for bugs, not-a-bugs, and/or regressions. 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