fix(Core/Movement): Non-repeating paths should not own the creature's home pos when finished (#26853)

This commit is contained in:
Gultask
2026-08-01 20:11:45 -03:00
committed by GitHub
parent bf8f6ebe5a
commit d1ebb2739b
@@ -508,6 +508,10 @@ bool WaypointMovementGenerator<Creature>::GetResetPosition(float& x, float& y, f
if (!i_path || i_path->Nodes.empty())
return false;
// A finished non-repeating path no longer owns the creature's reset position.
if (_done)
return false;
ASSERT(i_currentNode < i_path->Nodes.size(), "WaypointMovementGenerator::GetResetPos: tried to reference a node id ({}) which is not included in path ({})", i_currentNode, i_path->Id);
WaypointNode const& waypoint = i_path->Nodes.at(i_currentNode);