Bots can trade/donate their primary weapon with their commander#1629
Bots can trade/donate their primary weapon with their commander#1629sunzenshen wants to merge 1 commit intoNeotokyoRebuild:masterfrom
Conversation
|
Testing ideas: Remember to enable the bot command feature (this is an FCVAR_ARCHIVE ConVar, so you only need to do this once) To trigger the core behavior, collect some followers using the +use button, then drop your primary, and then look at one of your followers to request their primary: bot-cmd-trade-weapons.mp4Prior to this PR, because the bot command behavior was transitioned from neo_bot_tactical_monitor, any other tactical monitor behaviors were actually suspended indefinitely in favor of the bot command behavior. The fix this PR introduces was to move the bot command behavior transition to the Scenario Monitor, which has the following test implications:
bot-cmd-grenade-avoidance-sanity-check.mp4
bot-cmd-grenade-avoidance-paused-enemies.mp4 |
| { | ||
| if (me->m_hLeadingPlayer.Get() || me->m_hCommandingPlayer.Get()) | ||
| { | ||
| return SuspendFor(new CNEOBotCommandFollow, "Following commander"); |
There was a problem hiding this comment.
It turns out that launching into the bot commander following behavior was blocking other tactical monitor behaviors, so I moved this behavior launch point into neo_bot_scenario_monitor.
| { | ||
| if (me->m_hLeadingPlayer.Get() || me->m_hCommandingPlayer.Get()) | ||
| { | ||
| return SuspendFor(new CNEOBotCommandFollow, "Following commander"); |
There was a problem hiding this comment.
Moved from neo_bot_tactical_monitor, to unblock other tactical monitor behaviors.
234d52c to
1f608d0
Compare
| Vector vecCmdrFacing; | ||
| pCommander->EyeVectors(&vecCmdrFacing); | ||
|
|
||
| if (vecCmdrFacing.Dot(vecToBot) > 0.99f) |
There was a problem hiding this comment.
I struggle to aim at the right spot on a bot to get them to drop their weapon outside of the pre-round freeze, when a bot stands very close to me
There was a problem hiding this comment.
I get what you mean, but when I tried adding some bot movement away from the player, the bot path is often erratic enough that the bot walks away from the player's cursor, even if the movement vector is theoretically in line of the 2 players. That's why I associated this trading feature with bot commanding, as you really need to be able to control a bot's standing position before you try to initiate a trade.
|
I also notice that when the bot is close to me, the bot will throw the weapon past me and then often run to pick up the very weapon they just dropped before I am able to do so |
|
It looks like there is no consideration being made for whether the bot can drop their primary weapon (Think juggernaut) Or whether the commander can pick up the bot's primary weapon (Think recon commander and PZ) Still this doesn't really cause any issues. |
1f608d0 to
c6b77c0
Compare
Added some checks to make sure the bot and the commander can even trade (checking drop and checking pickup): bot-cmd-trade-weapons-ignore_jgr_balc.mp4 |
51eddf2 to
c78e5db
Compare
|
Rebased on top of the fix all warnings PR. |
c78e5db to
414af2b
Compare
Description
Toolchain