⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Implement BotResetLastAvoidReach tracking and export#209

Open
themuffinator wants to merge 1 commit intomainfrom
codex/new-task-9od9kl
Open

Implement BotResetLastAvoidReach tracking and export#209
themuffinator wants to merge 1 commit intomainfrom
codex/new-task-9od9kl

Conversation

@themuffinator
Copy link
Owner

Motivation

  • Mirror Quake III behavior by tracking the last avoided reachability separately from the general avoid list so it can be cleared independently.
  • Ensure movement state stores per-movestate last-avoid metadata to match retail logic used by combat/navigation code.

Description

  • Added fields to bot_movestate_t (lastavoidreach, lastavoidreachtime, lastavoidreachtries, lastavoidreachindex) in src/botlib/ai_move/bot_move.h to track the most-recently avoided reachability.
  • Updated BotMove_RefreshAvoidReach in src/botlib/ai_move/bot_move.c to compute and cache the most-recent avoid entry and its metadata.
  • Implemented BotMove_ResetLastAvoidReach (clears the cached timer and decrements tries) and wired it into BotMove_ResetAvoidReach to clear last-avoid fields when resetting all avoids.
  • Exported the new helper via the interface by adding BotResetLastAvoidReach to src/q2bridge/botlib.h and src/botlib/interface/bot_interface.c so the botlib API exposes the function.

Testing

  • No automated tests were executed for this change.
  • Code compiled was not verified in CI as part of this change (no build/test run was requested).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant