mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/FlightPath: teleport players at destination on floor Z when the flight ends, instead of having them fall from the air
(ported commit: 6a0a800535)
This commit is contained in:
@@ -119,7 +119,10 @@ void FlightPathMovementGenerator::DoFinalize(Player* player)
|
||||
// this prevent cheating with landing point at lags
|
||||
// when client side flight end early in comparison server side
|
||||
player->StopMoving();
|
||||
player->SetFallInformation(0, player->GetPositionZ());
|
||||
float mapHeight = player->GetMap()->GetHeight(player->GetPhaseShift(), _path[GetCurrentNode()]->LocX, _path[GetCurrentNode()]->LocY, _path[GetCurrentNode()]->LocZ);
|
||||
player->SetFallInformation(0, mapHeight);
|
||||
// When the player reaches the last flight point, teleport to destination at map height
|
||||
player->TeleportTo(_path[GetCurrentNode()]->MapID, _path[GetCurrentNode()]->LocX, _path[GetCurrentNode()]->LocY, mapHeight, player->GetOrientation());
|
||||
}
|
||||
|
||||
player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK);
|
||||
|
||||
Reference in New Issue
Block a user