Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
More accurate update movepath check
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 29, 2023
1 parent fd4fe46 commit 99a6ba2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Entities/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,10 @@ void Actor::Update()
// Hit Body update and handling
MOSRotating::Update();

if (m_UpdateMovePath) {
UpdateMovePath();
}

m_PieMenu->Update();

// Update the viewpoint to be at least what the position is
Expand Down Expand Up @@ -1356,7 +1360,7 @@ void Actor::Update()
if (!m_MovePath.empty())
m_MoveTarget = m_MovePath.front();
// No more path, so check if any more waypoints to make a new path to? This doesn't apply if we're following something
else if (m_UpdateMovePath || (m_MovePath.empty() && !m_Waypoints.empty() && !m_pMOMoveTarget))
else if (m_MovePath.empty() && !m_Waypoints.empty() && !m_pMOMoveTarget)
UpdateMovePath();
// Nope, so just conclude that we must have reached the ultimate AI target set and exit the goto mode
else if (!m_pMOMoveTarget)
Expand Down

0 comments on commit 99a6ba2

Please sign in to comment.