Core/FlightPath: teleport players at destination on floor Z when the flight ends, instead of having them fall from the air
(ported commit: 6a0a800535f6de9f6028a5375abfaf1dae8c7c28)
This commit is contained in:
1 parent
56a3758456
commit
35d95a7b87
1 file changed
+4
-1
@@ -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