mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/GameObjects: Transport (type 11) improvements
* Fully synchronize serverside animation progress with client * Implemented updating passenger positions on elevators * Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
This commit is contained in:
@@ -1265,9 +1265,7 @@ void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float
|
||||
else
|
||||
{
|
||||
go->Relocate(x, y, z, orientation);
|
||||
go->UpdateModelPosition();
|
||||
go->UpdatePositionData();
|
||||
go->UpdateObjectVisibility(false);
|
||||
go->AfterRelocation();
|
||||
RemoveGameObjectFromMoveList(go);
|
||||
}
|
||||
|
||||
@@ -1491,9 +1489,7 @@ void Map::MoveAllGameObjectsInMoveList()
|
||||
{
|
||||
// update pos
|
||||
go->Relocate(go->_newPosition);
|
||||
go->UpdateModelPosition();
|
||||
go->UpdatePositionData();
|
||||
go->UpdateObjectVisibility(false);
|
||||
go->AfterRelocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3028,7 +3024,7 @@ void Map::SendInitSelf(Player* player)
|
||||
UpdateData data(player->GetMapId());
|
||||
|
||||
// attach to player data current transport data
|
||||
if (Transport* transport = player->GetTransport())
|
||||
if (Transport* transport = dynamic_cast<Transport*>(player->GetTransport()))
|
||||
{
|
||||
transport->BuildCreateUpdateBlockForPlayer(&data, player);
|
||||
player->m_visibleTransports.insert(transport->GetGUID());
|
||||
@@ -3038,7 +3034,7 @@ void Map::SendInitSelf(Player* player)
|
||||
player->BuildCreateUpdateBlockForPlayer(&data, player);
|
||||
|
||||
// build other passengers at transport also (they always visible and marked as visible and will not send at visibility update at add to map
|
||||
if (Transport* transport = player->GetTransport())
|
||||
if (Transport* transport = dynamic_cast<Transport*>(player->GetTransport()))
|
||||
for (WorldObject* passenger : transport->GetPassengers())
|
||||
if (player != passenger && player->HaveAtClient(passenger))
|
||||
passenger->BuildCreateUpdateBlockForPlayer(&data, player);
|
||||
|
||||
Reference in New Issue
Block a user