fix(Core/Movement): Crash FlightPathMovementGenerator (#24347)
This commit is contained in:
parent
15855e9080
commit
a43dda6444
1 changed files with 2 additions and 2 deletions
|
|
@ -389,10 +389,10 @@ void FlightPathMovementGenerator::LoadPath(Player* player)
|
|||
LOG_ERROR("movement.flightpath", "Failed to build correct path for player: {}. Current node: {}, max nodes: {}. Paths: {}. Player pos: {}.", player->GetGUID().ToString(), GetCurrentNode(), i_path.size(), paths, player->GetPosition().ToString());
|
||||
|
||||
// Lets choose the second last element so that a player would still have some flight.
|
||||
if (int(i_path.size()) - 2 >= 0)
|
||||
if (i_path.size() >= 2)
|
||||
i_currentNode = uint32(i_path.size() - 2);
|
||||
else
|
||||
i_currentNode = uint32(i_path.size() - 1);
|
||||
i_currentNode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue