Core/Movement: provide an extra spline path vertex for taxi pathings … (#23817)

* Core/Movement: provide an extra spline path vertex for taxi pathings so the first path point wont get lost.

* Update FlightPathMovementGenerator.cpp
This commit is contained in:
Ovah
2019-09-22 17:12:59 +02:00
committed by Giacomo Pozzoni
parent 8e3862cfbd
commit cf3277c641

View File

@@ -75,6 +75,8 @@ void FlightPathMovementGenerator::DoReset(Player* owner)
owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(owner);
// Providing a starting vertex since the taxi paths do not provide such
init.Path().push_back(G3D::Vector3(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ()));
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{