mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Movement: first part of porting the new creature hover handling
This commit is contained in:
@@ -1117,12 +1117,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 UNIT_FIELD_HOVERHEIGHT sent in object updates
|
||||
if (player->HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
|
||||
z += player->GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
|
||||
|
||||
player->Relocate(x, y, z, orientation);
|
||||
if (player->IsVehicle())
|
||||
player->GetVehicleKit()->RelocatePassengers();
|
||||
@@ -1153,12 +1147,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 UNIT_FIELD_HOVERHEIGHT sent in object updates
|
||||
if (creature->HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
|
||||
z += creature->GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
|
||||
|
||||
// delay creature move for grid/cell to grid/cell moves
|
||||
if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user