mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Movement: fixed taxi pathings getting finalized earlier than intended (#23830)
* Core/Movement: fixed taxi pathings getting finalized earlier than intended Since we handle the intial starting point of a spline properly now the update logic was still expecting the old handling which resulted in incrementing the current node index earlier than intended * apply a missing change
This commit is contained in:
@@ -94,8 +94,9 @@ bool FlightPathMovementGenerator::DoUpdate(Player* owner, uint32 /*diff*/)
|
||||
if (!owner)
|
||||
return false;
|
||||
|
||||
uint32 pointId = owner->movespline->currentPathIdx() < 0 ? 0 : owner->movespline->currentPathIdx();
|
||||
if (pointId > _currentNode && _currentNode < _path.size())
|
||||
// skipping the first spline path point because it's our starting point and not a taxi path point
|
||||
uint32 pointId = owner->movespline->currentPathIdx() <= 0 ? 0 : owner->movespline->currentPathIdx() - 1;
|
||||
if (pointId > _currentNode && _currentNode < _path.size() - 1)
|
||||
{
|
||||
bool departureEvent = true;
|
||||
do
|
||||
@@ -122,7 +123,7 @@ bool FlightPathMovementGenerator::DoUpdate(Player* owner, uint32 /*diff*/)
|
||||
|
||||
_currentNode += departureEvent ? 1 : 0;
|
||||
departureEvent = !departureEvent;
|
||||
} while (_currentNode < _path.size());
|
||||
} while (_currentNode < _path.size() - 1);
|
||||
}
|
||||
|
||||
if (_currentNode >= (_path.size() - 1))
|
||||
|
||||
Reference in New Issue
Block a user