Bots avoid grenade-related hazard areas - #2020
Conversation
sunzenshen
left a comment
There was a problem hiding this comment.
The goal of this PR was to have bots avoid areas that were visible from smoked areas, if they do not have thermal vision. Before this PR, bots tended to disregard smoke and would fall victim to either Support bots or humans that know to spray into the smoke. This PR introduces a time-expiring hazard area marking lookup for smoke and general hazardous areas.
Along with support for smoke, I added hazard area marking for grenades and death locations. The thinking for bot grenade trajectories is that they are so erratic that it's safer to assume that any place along the trajectory towards the target and beyond is a dangerous area. For marking death areas of friendly bots, it's mostly to have bots pause towards running into a fatal funnel if the room is narrow enough to be blocked by the bot death locations.
|
Demo example of bots moving out of a room with smoke coverage, into one where there is no exposed smoke: bot-avoid-smoke-demo.mp4 |
sunzenshen
left a comment
There was a problem hiding this comment.
I forgot that I also incremented OnStuck area avoidance penalties for bot death areas, not just for bots getting stuck so here's another set of adjustments when testing the allowance of bot death areas as candidates for where to escape a hazard.
75814a1 to
0134d13
Compare
There was a problem hiding this comment.
Finally figured out why bots completely stop when blocked by a hazard area, and implemented partial pathing up to hazard area boundaries.
Opening up this PR for review again.
Here's the script I used to set up observation of bot behavior:
sv_neo_preround_freeze_time 2;
mp_chattime 2;
cl_neo_grenade_show_path 1; sv_neo_grenade_show_path 1;
sv_neo_bot_grenade_polite_smoke 0;
sv_neo_bot_grenade_polite_frag 0;
nb_debug path;
0134d13 to
3df5302
Compare
3df5302 to
c954e95
Compare
c954e95 to
8ed435b
Compare
8ed435b to
9637047
Compare
|
Needed to rebase a merge conflict from #2065 In reviewing the conflicts, I realized that I needed to clean up the repath timer still in the new hazard avoidance class to match the #2065 convention, and also fixed a potential null dereference with a bot's chosen safe area (we hadn't seen it because for the most part bots have been able to find safe areas easily in the maps we tested). |
9637047 to
db37ac3
Compare
|
Needed to rebase |
Bots avoid hazard areas: - areas that are in line of sight of a smoke cloud - areas that are in line of sight of a grenade trajectory
db37ac3 to
4dfd63b
Compare
|
Addressed @sunmachine 's code review feedback in #2128 |
Description
Bots avoid hazard areas:
Toolchain