-
Notifications
You must be signed in to change notification settings - Fork 20
Bots - Shoot through glass + penetrateables #1283
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
Bots - Shoot through glass + penetrateables #1283
Conversation
811dcaa to
e3e65ff
Compare
e3e65ff to
e541da0
Compare
sunzenshen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, bots now can shoot through glass when they couldn't do so before.
bot_penetratables_oilstain_glass.mp4
bot_penetratables_ballistrade_glass.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO (LATER): Test/check for non-penetrable glass?
Tested against the tarmac non-penetrable glass, and indeed it seems the bots will fruitlessly empty their magazine against the bulletproof windows.
To repro:
neo_bot_quota 2;
map ntre_tarmac_ctg;
// Spawn to the garage side, so the bot spawns on the tarmac side.
// Then, teleport near the bulletproof window.
setang 7.062000 13.297527 0.000000;
setpos 477.418365 -252.499146 -210.468750;
But we can leave it for some future PR if you don't feel like it belongs here.
e541da0 to
d68f0d7
Compare
|
@Rainyan I've added in glass penetration vs non-penetration check, just does an extra trace then penetration check without distance limitation. @sunzenshen I've added in distance restriction scaling by weapon's penetration, so for example: a bot using an SRS will attempt a further distance than MX which will attempt further than SRM. It is still short distance and does become shorter distance for weapons weaker than MX but it's intended to be kept limited. |
|
Bots no longer try to shoot through the impenetrable glass on Tarmac: bot_penetratables_tarmac_bulletproof_fix.mp4Bots appear to open fire on a player that is holding the ghost behind a paper wall near the house spawn on Isolation: bot_penetratables_ghost_behind_cover_attack.mp4 |
Maybe you meant this already as a positive, but this is probably the desired behaviour, since good players should absolutely wallbang the ghoster when they have the chance. It'd be really cool if we had some kind of "confidence level" that the bots had on the enemy location, and if they felt confident enough (seen player recently in area, sound cues, etc), they could outright start wallbanging thin surfaces to do preemptive damage, like a real high-level human player would. But that's out of scope for this PR surely. The classic situation is hearing someone cloak just around the corner/make steps, and preemptively start shooting at them before they appear visually. Although this should probably only happen for expert bots. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the tarmac bulletproof glass case mentioned before, it seems that if you are holding the ghost, the bots will still attempt to wallbang.
If it's not too much work, could you make it such that even if the bots have vision of the ghoster (possibly through a bullet-proof window), if they know their bullets cannot penetrate (the wall thickness check), they won't waste bullets trying to shoot through the impenetrable areas, but instead consider it as impossible and choose whatever is their alternative action to shooting instantly.
Steps to reproduce:
neo_bot_quota 2;
map ntre_tarmac_ctg;
// Spawn to the garage side, so the bot spawns on the tarmac side.
// Then, drop your gun and noclip to go grab the ghost
// Then, teleport near the bulletproof window.
setang 7.062000 13.297527 0.000000;
setpos 477.418365 -252.499146 -210.468750;
What happens:
- The bots attempt to spam the ghost carrier through the bullet-proof glass
What should happen:
- The bots recognize they cannot penetrate, and choose something else
* Bots should now be able to shoot through glass
* Bots should also shoot through penetratable if it's going up
against a ghoster at a short distance
* Penetrable vs non-penetrable glass check, weapon pen try scaling
* Added extra checks for glass to differentiate penetrable vs
non-penetrable and if glass do that extra pentration check
* Also use using regarding overload declarations
* Added try penetrate depending on weapon penetration value
so weapon like SRS try at longer distance while weaker
weapons like milso/SRM try at minimum distance
* fixes NeotokyoRebuild#1282
* Just not preventing penetration check flag from using the if glass fixes the shooting on ghoster behind non-pen glass issue * Defined CHAR_TEX_BLOCKBULLETS 'J' * Limit ghoster wallbang to hard + expert bots * fixes NeotokyoRebuild#1282
d68f0d7 to
4caf215
Compare
|
@Rainyan I've dropped the extra statement preventing penetration test flag from utilizing glass-only check if and that looks to have fixed the firing at ghoster behind non-penetrated glass issue. Also limited the ability to wallbang ghoster at hard + expert bots. @sunzenshen Added |
|
Ghost behind ballistic glass now works as expected: bot_penetratables_tarmac_bulletproof_ghost_fix.mp4 |
Rainyan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
Toolchain
Linked Issues