From ecd7c1daba6c761c0e6a37f00f72143f9f5fec47 Mon Sep 17 00:00:00 2001 From: jeefo Date: Thu, 2 May 2024 22:40:15 +0300 Subject: [PATCH] combat: some reverts from previous changes --- src/combat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/combat.cpp b/src/combat.cpp index e07f6c5..d6d8d90 100644 --- a/src/combat.cpp +++ b/src/combat.cpp @@ -1345,7 +1345,7 @@ void Bot::attackMovement () { const auto pistolStrafeDistance = game.is (GameFlags::CSDM) ? kSprayDistanceX2 * 3.0f : kSprayDistanceX2; // fire hurts friend value here is from previous frame, but acceptable, and saves us alot of cpu cycles - if (approach >= 30 || m_fireHurtsFriend || ((usesPistol () || usesShotgun ()) + if (approach < 30 || m_fireHurtsFriend || ((usesPistol () || usesShotgun ()) && distance < pistolStrafeDistance && isInViewCone (m_enemyOrigin))) { m_fightStyle = Fight::Strafe; @@ -1367,7 +1367,7 @@ void Bot::attackMovement () { }; auto strafeUpdateTime = [] () { - return game.time () + rg (0.3f, 1.0f); + return game.time () + rg (0.3f, 0.8f); }; // to start strafing, we have to first figure out if the target is on the left side or right side