Add weak weapon concept: bots with only Glock avoid combat#79
Merged
Add weak weapon concept: bots with only Glock avoid combat#79
Conversation
cda8b9a to
a8d2b39
Compare
aaf4444 to
65b9ca2
Compare
65b9ca2 to
aed89e2
Compare
Bots carrying only weak weapons (currently just the Glock) will: - Not actively seek out enemies - Not track enemy sounds for navigation - Not pursue sound-based waypoint goals - Only fight back briefly (1s) after being attacked, then disengage (normal weapons retain the 3s combat window) The weak weapon state is re-evaluated each frame based on the bot's current inventory and ammo, so picking up a better weapon immediately restores normal combat behavior.
aed89e2 to
387bb32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BotIsWeakWeapon()/BotHasOnlyWeakWeapons()helpers identifying the Glock as the only weak weaponb_only_has_weak_weaponsstate flag computed per-frame inBotThinkHandleEnemyBotCombatDisengageTime()helper returns the appropriate timeout based on weapon stateTest plan
test_bot_weapons: BotIsWeakWeapon (6 tests) + BotHasOnlyWeakWeapons (7 tests)test_bot: BotThink weak weapon no-seek, fights-back, disengages-after-1s, and strong-weapon-seeks (4 tests)test_bot_navigate: track sound stops with weak weapons, find waypoint goal skips sound tracking (2 tests)make testwith cross-compiler