Skip to content

[TF2] Add CTFBotFreezeInput behavior to make bots respect TF_COND_FREEZE_INPUT #1331

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

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

Conversation

FlaminSarge
Copy link
Contributor

@FlaminSarge FlaminSarge commented Jun 5, 2025

Description

As described in a comment on #1324 (comment) bots do not respect the 2 conditions that prevent player input, TF_COND_HALLOWEEN_THRILLER and TF_COND_FREEZE_INPUT. This PR causes both conditions to make bots stop all other behavior while they have the conditions.

As a note, with #1324 I plan to decouple THRILLER from blocked inputs and solely tie it to dancing and music, leaving FREEZE_INPUT as the only frozen input condition, which would also update this to remove the THRILLER case here.

This has been tested on Lakeside Event for THRILLER and with manually adding FREEZE_INPUT. If necessary I can test on Doomsday Event and Helltower as well, but I feel that's not necessary.

…EZE_INPUT

For now, this also handles TF_COND_HALLOWEEN_THRILLER
@FlaminSarge
Copy link
Contributor Author

FlaminSarge commented Jun 10, 2025

I'm investigating whether this can be replaced with a Continue() in the initial FREEZE_INPUT check instead of a whole new behavior. However, a new behavior seems like the 'correct' way to handle this, rather than calling Continue() early to skip CTFBotMainAction's handling, particularly when other triggers in CTFBotMainAction could potentially interrupt the behavior (e.g. OnInjured/OnContact/etc.). I'm not sure whether OnKilled needs special handling.
The new behavior class is necessary; the bots attempt to jump/etc. as if they're stuck if the new behavior isn't used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant