Fixed infinite loop with ai_debugpath

This commit is contained in:
smallmodel 2023-10-22 21:15:58 +02:00
parent b996918d3b
commit 5cffe3fb05
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -5273,10 +5273,9 @@ void Actor::MovePath(float fMoveSpeed)
G_DebugLine(pos, dest, 1, 0, 0, 1);
for (current_path = m_Path.CurrentNode(); current_path != m_Path.LastNode(); current_path = m_Path.NextNode()) {
for (current_path = m_Path.CurrentNode(); current_path != m_Path.LastNode(); current_path--) {
pos = current_path->point;
current_path--;
dest = current_path->point;
dest = (current_path - 1)->point;
G_DebugLine(pos + Vector(0, 0, 32), dest + Vector(0, 0, 32), 0, 1, 0, 1);
}