Skip to content

Bots don't avoid smoke grenades with a known thrower - #2133

Open
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-smoke-grenade-identification
Open

sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-smoke-grenade-identification

Conversation

@sunzenshen

Copy link
Copy Markdown
Contributor

Description

Adds smoke identification code to the bot grenade avoidance behavior.
Before bots retreated from smoke grenades while they were in flight, even in circumstances where the nature of the grenade should be obvious.
Now checks whether the smoke grenade was thrown by a teammate (implied that the teammate communicated the intent), or whether the thrower was identified by the bot recently.

Toolchain

  • Windows MSVC VS2022

Linked Issues

@sunzenshen
sunzenshen requested a review from a team September 13, 2026 05:49
@sunzenshen sunzenshen added the Bots Related to bot players label Sep 13, 2026
@sunzenshen

Copy link
Copy Markdown
Contributor Author

This PR is partly a response to being reminded that previously bots do not differentiate smokes from frags when retreating from flying grenades:

bot-follow-cmdr-in-smoke.mp4

After the bots differentiate who threw the smoke grenade:

bot-ignore-known-smoke.mp4

{
if ( grenadeArea->IsPotentiallyVisible( me->GetLastKnownArea() ) )
{
bIsExposed = true;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also took the opportunity to remove some dead stub code that didn't end up being used for anything impactful.

@Rainyan Rainyan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems good to me, also verified with sv_neo_bot_cmdr_debug_pause_uncommanded 1 that a support throwing a frag grenade still correctly gets the teammates to disperse.

@Rainyan
Rainyan requested a review from a team September 14, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants