Update vision.cpp

This commit is contained in:
commandcobra7 2024-04-30 14:18:22 +03:00 committed by jeefo
commit 3b4c72b051

View file

@ -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)) {