From 3b4c72b051e14e8dde1fee1906720fea6eac923f Mon Sep 17 00:00:00 2001 From: commandcobra7 <91374215+commandcobra7@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:18:22 +0300 Subject: [PATCH] Update vision.cpp --- src/vision.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vision.cpp b/src/vision.cpp index 0acc34b..c63b3f1 100644 --- a/src/vision.cpp +++ b/src/vision.cpp @@ -550,10 +550,10 @@ void Bot::setAimDirection () { && pev->origin.distanceSq (destOrigin) < cr::sqrf (512.0f)) { const auto nextPathIndex = m_pathWalk.next (); - const auto doubleNextPath = m_pathWalk.doubleNext (); + const auto nextPathX2 = m_pathWalk.nextX2 (); - if (vistab.visible (m_currentNodeIndex, doubleNextPath)) { - const auto &gn = graph[doubleNextPath]; + if (vistab.visible (m_currentNodeIndex, nextPathX2)) { + const auto &gn = graph[nextPathX2]; m_lookAt = gn.origin + pev->view_ofs; } else if (vistab.visible (m_currentNodeIndex, nextPathIndex)) {