Core/Movement: Fixed creature hover

Port From (https://github.com/TrinityCore/TrinityCore/commit/2e2b29861878fda2d27156c71a1d8ed7dbe0b4fe)
This commit is contained in:
hondacrx
2021-08-24 11:10:59 -04:00
parent 1c5bb258d5
commit 89058fec83
9 changed files with 59 additions and 90 deletions
-12
View File
@@ -1016,12 +1016,6 @@ namespace Game.Maps
var oldcell = player.GetCurrentCell();
var newcell = new Cell(x, y);
//! If hovering, always increase our server-side Z position
//! Client automatically projects correct position based on Z coord sent in monster move
//! and HoverHeight sent in object updates
if (player.HasUnitMovementFlag(MovementFlag.Hover))
z += player.m_unitData.HoverHeight;
player.Relocate(x, y, z, orientation);
if (player.IsVehicle())
player.GetVehicleKit().RelocatePassengers();
@@ -1052,12 +1046,6 @@ namespace Game.Maps
if (!respawnRelocationOnFail && GetGrid(new_cell.GetGridX(), new_cell.GetGridY()) == null)
return;
//! If hovering, always increase our server-side Z position
//! Client automatically projects correct position based on Z coord sent in monster move
//! and HoverHeight sent in object updates
if (creature.HasUnitMovementFlag(MovementFlag.Hover))
z += creature.m_unitData.HoverHeight;
Cell old_cell = creature.GetCurrentCell();
// delay creature move for grid/cell to grid/cell moves
if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell))