Core/Movement: Fixed creature hover

Closes #15177

(cherry picked from commit 2baa81065b)
This commit is contained in:
Shauren
2017-11-23 18:12:44 +01:00
parent 028f9b4780
commit 2e2b298618
10 changed files with 59 additions and 93 deletions

View File

@@ -1138,12 +1138,6 @@ void Map::PlayerRelocation(Player* player, float x, float y, float z, float orie
Cell old_cell(player->GetPositionX(), player->GetPositionY());
Cell 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();
@@ -1173,12 +1167,6 @@ void Map::CreatureRelocation(Creature* creature, float x, float y, float z, floa
if (!respawnRelocationOnFail && !getNGrid(new_cell.GridX(), new_cell.GridY()))
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))