Skip to content

Refine bot proactive reload criteria#1768

Open
sunzenshen wants to merge 3 commits intoNeotokyoRebuild:masterfrom
sunzenshen:bot-reload-from-cover
Open

Refine bot proactive reload criteria#1768
sunzenshen wants to merge 3 commits intoNeotokyoRebuild:masterfrom
sunzenshen:bot-reload-from-cover

Conversation

@sunzenshen
Copy link
Contributor

Description

Tactical Monitor runs on a single thread, so bots can be in extended tactical situations that last longer than their ammo capacity. This PR adds more proactive reload checkpoints, while adding more criteria checks for when to reload.

Toolchain

  • Windows MSVC VS2022

@sunzenshen sunzenshen requested a review from a team March 2, 2026 09:42
@AdamTadeusz
Copy link
Contributor

Ran into this assert where the weapon the penetration of which was being tested was a smoke grenade. Not sure how to replicate and so test if its present on master too.

image

@DESTROYGIRL DESTROYGIRL added the Bots Related to bot players label Mar 2, 2026
@sunzenshen sunzenshen force-pushed the bot-reload-from-cover branch from 99fa667 to 0822264 Compare March 3, 2026 06:06
// Only bother with fire penetration in short distance
auto *neoWeapon = static_cast<CNEOBaseCombatWeapon *>(GetActiveWeapon());
if (!neoWeapon)
if (!neoWeapon || !(neoWeapon->GetNeoWepBits() & NEO_WEP_FIREARM))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's see if the attached stack trace scenario happens again after checking the NEO_WEP_FIREARM bit. This should filter out the smoke grenade case mentioned.

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.

3 participants