mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Transports: Fixed clientside position of stoppable transports
This commit is contained in:
@@ -658,9 +658,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
data->FlushBits();
|
||||
if (transport)
|
||||
{
|
||||
*data << uint32(transport->GetTransportPeriod());
|
||||
*data << uint32(transport->GetTimer());
|
||||
data->WriteBit(transport->IsStopRequested());
|
||||
uint32 period = transport->GetTransportPeriod();
|
||||
|
||||
*data << uint32((((int64(transport->GetTimer()) - int64(GameTime::GetGameTimeMS())) % period) + period) % period); // TimeOffset
|
||||
*data << uint32(transport->GetNextStopTimestamp().value_or(0));
|
||||
data->WriteBit(transport->GetNextStopTimestamp().has_value());
|
||||
data->WriteBit(transport->IsStopped());
|
||||
data->WriteBit(false);
|
||||
data->FlushBits();
|
||||
|
||||
@@ -89,7 +89,7 @@ class TC_GAME_API Transport final : public GameObject, public TransportBase
|
||||
uint32 GetTransportPeriod() const { return m_gameObjectData->Level; }
|
||||
void SetPeriod(uint32 period) { SetLevel(period); }
|
||||
uint32 GetTimer() const { return _pathProgress; }
|
||||
bool IsStopRequested() const { return _requestStopTimestamp.has_value(); }
|
||||
Optional<uint32> GetNextStopTimestamp() const { return _requestStopTimestamp; }
|
||||
bool IsStopped() const { return HasDynamicFlag(GO_DYNFLAG_LO_STOPPED); }
|
||||
|
||||
void UpdatePosition(float x, float y, float z, float o);
|
||||
|
||||
Reference in New Issue
Block a user