bot: minor tweak to button selection while with knife
This commit is contained in:
parent
4a00459c26
commit
c856b55302
1 changed files with 3 additions and 1 deletions
|
|
@ -886,7 +886,9 @@ void Bot::selectWeapons (float distance, int index, int id, int choosen) {
|
|||
if (distance < kSprayDistance || m_blindTime > game.time () || usesKnife ()) {
|
||||
if (id == Weapon::Knife) {
|
||||
if (distance < 64.0f) {
|
||||
if (rg.chance (40) || hasShield ()) {
|
||||
const auto primaryAtackChance = (m_oldButtons & IN_ATTACK2) ? 80 : 40;
|
||||
|
||||
if (rg.chance (primaryAtackChance) || hasShield ()) {
|
||||
pev->button |= IN_ATTACK; // use primary attack
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue