diff --git a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp index fd305f6955..380767ccc7 100644 --- a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp @@ -619,8 +619,12 @@ void CWorldRPCs::SetSyncIntervals(NetBitStreamInterface& bitStream) bitStream.Read(g_TickRateSettings.iObjectSync); bitStream.Read(g_TickRateSettings.iKeySyncRotation); bitStream.Read(g_TickRateSettings.iKeySyncAnalogMove); - bitStream.Read(g_TickRateSettings.iPedSyncerDistance); - bitStream.Read(g_TickRateSettings.iUnoccupiedVehicleSyncerDistance); + + if (bitStream.Can(eBitStreamVersion::FixSyncerDistance)) + { + bitStream.Read(g_TickRateSettings.iPedSyncerDistance); + bitStream.Read(g_TickRateSettings.iUnoccupiedVehicleSyncerDistance); + } } void CWorldRPCs::SetMoonSize(NetBitStreamInterface& bitStream) diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index 930e814879..24c9ff6edc 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -10861,8 +10861,13 @@ bool CStaticFunctionDefinitions::SendSyncIntervals(CPlayer* pPlayer) BitStream.pBitStream->Write(g_TickRateSettings.iObjectSync); BitStream.pBitStream->Write(g_TickRateSettings.iKeySyncRotation); BitStream.pBitStream->Write(g_TickRateSettings.iKeySyncAnalogMove); - BitStream.pBitStream->Write(g_TickRateSettings.iPedSyncerDistance); - BitStream.pBitStream->Write(g_TickRateSettings.iUnoccupiedVehicleSyncerDistance); + + if (pPlayer->CanBitStream(eBitStreamVersion::FixSyncerDistance)) + { + BitStream.pBitStream->Write(g_TickRateSettings.iPedSyncerDistance); + BitStream.pBitStream->Write(g_TickRateSettings.iUnoccupiedVehicleSyncerDistance); + } + if (pPlayer) pPlayer->Send(CLuaPacket(SET_SYNC_INTERVALS, *BitStream.pBitStream)); else diff --git a/Shared/sdk/net/bitstream.h b/Shared/sdk/net/bitstream.h index 88bdfcfff2..d5471c7898 100644 --- a/Shared/sdk/net/bitstream.h +++ b/Shared/sdk/net/bitstream.h @@ -580,6 +580,10 @@ enum class eBitStreamVersion : unsigned short // 2024-11-07 WorldSpecialProperty_IgnoreFireState, + // Fix iPedSyncerDistance and iUnoccupiedVehicleSyncerDistance sync + // 2024-11-22 + FixSyncerDistance, + // This allows us to automatically increment the BitStreamVersion when things are added to this enum. // Make sure you only add things above this comment. Next,