Files
fs2open.github.com/code
Goober5000andClaude Fable 5.1 2052dcaeb0 reset stale AI order state and track previous_mode through dynamic chases
Several ai_info fields remember which order set them up (enemy_wing,
guard_objnum/signature/wingnum) or which mode a dynamic goal interrupted
(previous_mode, resume_goal_time), but nothing cleared them when a new
order took over.  A ship that once guarded a wing would be yanked back
into AIM_GUARD whenever a wingmate died; a stale previous_mode of
AIM_GUARD could make a former guard abandon a counterattack; a stale
enemy_wing biased every find_enemy() toward a long-ago target; and a
resume_goal_time left over from a dynamic chase suppressed target
acquisition for up to 20 seconds into the next order.

Add ai_reset_order_state(), called when ai_process_mission_orders()
takes up a goal and when ai_do_default_behavior() runs.  Each order's
own setup repopulates the fields it needs.  enemy_wing is reset under
either $fix stale ai order state or $fix ai target recovery, since it
affects target selection; the rest only under the new flag.

maybe_set_dynamic_chase() wrote aip->mode into previous_submode, a
retail typo that left previous_mode untracked for dynamic chases.  Under
the flag, save both fields properly, but not when a dynamic goal is
already in progress, so a nested interruption does not clobber the mode
to return to.  Apply the same guard to the strafe/chase transitions in
aibig.cpp.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-12 20:09:29 -04:00
..
2026-04-30 00:35:19 -04:00
2026-07-20 23:04:56 -04:00
2026-07-23 15:52:27 +02:00
2026-07-23 15:52:27 +02:00
2018-07-15 19:37:24 +02:00
2026-07-23 15:52:27 +02:00
2026-07-23 15:52:27 +02:00
2025-08-18 11:59:22 -04:00
2026-09-12 03:57:27 +00:00
2026-05-12 11:31:20 -04:00
2026-05-28 14:43:48 +09:00
2026-04-30 00:35:19 -04:00
2026-09-08 13:20:36 -04:00
2026-09-08 10:48:13 -04:00
2026-07-20 23:04:56 -04:00
2026-07-23 15:52:27 +02:00
2026-07-23 15:52:27 +02:00
2026-07-23 15:52:27 +02:00
2016-07-22 12:07:19 +02:00