diff --git a/src/game/Entities/Transports.cpp b/src/game/Entities/Transports.cpp index 25d86d063ba..ca661c2a35a 100644 --- a/src/game/Entities/Transports.cpp +++ b/src/game/Entities/Transports.cpp @@ -281,6 +281,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl Relocate(x, y, z); bool mapChange = GetMapId() != newMapid; + bool playerPassenger = false; auto& passengers = GetPassengers(); for (m_passengerTeleportIterator = passengers.begin(); m_passengerTeleportIterator != passengers.end();) @@ -316,6 +317,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl if (player->IsDead() && !player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) player->ResurrectPlayer(1.0); player->TeleportTo(newMapid, pos.x, pos.y, pos.z, pos.o, TELE_TO_NOT_LEAVE_TRANSPORT, nullptr, this); + playerPassenger = true; break; } case TYPEID_GAMEOBJECT: @@ -343,12 +345,14 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl ResetMap(); Map* newMap = sMapMgr.CreateMap(newMapid, this); - newMap->GetMessager().AddMessage([transport = this](Map* map) + newMap->GetMessager().AddMessage([transport = this, playerPassenger](Map* map) { transport->SetMap(map); transport->Object::AddToWorld(); map->AddTransport(transport); transport->AddModelToMap(); + if (playerPassenger) + map->ForceLoadGrid(transport->GetPositionX(), transport->GetPositionY()); transport->SpawnPassengers(); transport->UpdateForMap(map, true); });