diff --git a/src/vision.cpp b/src/vision.cpp index e10f9b8..787c00a 100644 --- a/src/vision.cpp +++ b/src/vision.cpp @@ -278,8 +278,8 @@ void Bot::updateLookAngles () { } void Bot::updateLookAnglesNewbie (const Vector &direction, float delta) { - Vector spring { 13.0f, 13.0f, 0.0f }; - Vector damperCoefficient { 0.22f, 0.22f, 0.0f }; + Vector spring { 13.0f, 9.0f, 0.0f }; + Vector damperCoefficient { 0.28f, 0.26f, 0.0f }; const float offset = cr::clamp (static_cast (m_difficulty), 1.0f, 4.0f) * 25.0f; @@ -296,10 +296,14 @@ void Bot::updateLookAnglesNewbie (const Vector &direction, float delta) { if (m_aimFlags & (AimFlags::Enemy | AimFlags::Entity)) { m_playerTargetTime = game.time (); - m_randomizedIdealAngles = m_idealAngles; - stiffness = spring * (0.2f + offset / 125.0f); + // bias aim slightly below exact target (chest > head) + m_randomizedIdealAngles = m_idealAngles; + m_randomizedIdealAngles.x += rg(2.0f, 6.0f); // pitch down + + stiffness = spring * (0.18f + offset / 140.0f); } + else { // is it time for bot to randomize the aim direction again (more often where moving) ? if (m_randomizeAnglesTime < game.time () @@ -443,7 +447,7 @@ void Bot::setAimDirection () { m_canSetAimDirection = false; } - // don't switch view right away after loosing focus with current enemy + // don't switch view right away after loosing focus with current enemy if ((m_shootTime + rg (0.75f, 1.25f) > game.time () || m_seeEnemyTime + rg (1.0f, 1.25f) > game.time ()) @@ -670,3 +674,4 @@ void Bot::setAimDirection () { m_lookAt = m_destOrigin; } } +