Core/Transports: Fixed clientside position of stoppable transports

This commit is contained in:
Shauren
2025-04-17 00:04:41 +02:00
parent 821ecf8fa3
commit 96026bfc58
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -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();