diff options
-rw-r--r-- | src/server/game/Entities/Object/Object.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 8a722de45dc..a2f9654fa5f 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -355,10 +355,16 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const bool SmoothPhasing = false; bool SceneObjCreate = false; bool PlayerCreateData = false; + std::vector<uint32> const* PauseTimes = nullptr; uint32 PauseTimesCount = 0; if (GameObject const* go = ToGameObject()) + { if (go->GetGoType() == GAMEOBJECT_TYPE_TRANSPORT) - PauseTimesCount = go->GetGOValue()->Transport.StopFrames->size(); + { + PauseTimes = go->GetGOValue()->Transport.StopFrames; + PauseTimesCount = PauseTimes->size(); + } + } data->WriteBit(NoBirthAnim); data->WriteBit(EnablePortals); @@ -502,8 +508,8 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const if (Rotation) *data << uint64(ToGameObject()->GetPackedWorldRotation()); // Rotation - if (GameObject const* go = ToGameObject()) - data->append(go->GetGOValue()->Transport.StopFrames->data(), PauseTimesCount); + if (PauseTimes) + data->append(PauseTimes->data(), PauseTimes->size()); if (HasMovementTransport) { |