Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Server/mods/deathmatch/logic/CMainConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,6 @@ const std::vector<SIntSetting>& CMainConfig::GetIntSettingList()
{true, true, 50, 100, 400, "ped_syncer_distance", &g_TickRateSettings.iPedSyncerDistance, &CMainConfig::OnTickRateChange},
{true, true, 50, 130, 400, "unoccupied_vehicle_syncer_distance", &g_TickRateSettings.iUnoccupiedVehicleSyncerDistance, &CMainConfig::OnTickRateChange},
{true, true, 0, 30, 130, "vehicle_contact_sync_radius", &g_TickRateSettings.iVehicleContactSyncRadius, &CMainConfig::OnTickRateChange},
{true, true, 0, 200, 300, "object_contact_sync_radius", &g_TickRateSettings.iObjectContactSyncRadius, &CMainConfig::OnTickRateChange},
{false, false, 0, 1, 2, "compact_internal_databases", &m_iCompactInternalDatabases, NULL},
{true, true, 0, 1, 2, "minclientversion_auto_update", &m_iMinClientVersionAutoUpdate, NULL},
{true, true, 0, 0, 100, "server_logic_fps_limit", &m_iServerLogicFpsLimit, NULL},
Expand Down
12 changes: 5 additions & 7 deletions Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream)

// Player position
SPositionSync position(false);
if (!BitStream.Read(&position))
return false;
bool positionRead = BitStream.Read(&position);

if (pContactElement != nullptr)
if (positionRead && pContactElement != nullptr)
{
int32_t radius = -1;

Expand All @@ -87,10 +86,6 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream)
if (((CVehicle*)pContactElement)->GetSyncer() != pSourcePlayer)
radius = g_TickRateSettings.iVehicleContactSyncRadius;
break;
case CElement::OBJECT:
if (((CObject*)pContactElement)->GetSyncer() != pSourcePlayer)
radius = g_TickRateSettings.iObjectContactSyncRadius;
break;
}

if (radius > -1 &&
Expand Down Expand Up @@ -122,6 +117,9 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream)
pSourcePlayer->CallEvent("onPlayerContact", Arguments);
}

if (!positionRead)
return false;

if (pContactElement)
{
pSourcePlayer->SetContactPosition(position.data.vecPosition);
Expand Down
4 changes: 0 additions & 4 deletions Server/mods/deathmatch/mtaserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@
Available range: 0 to 130. Default - 30 -->
<vehicle_contact_sync_radius>30</vehicle_contact_sync_radius>

<!-- This parameter specifies the radius in which any contact with a object will turn the player into its syncer.
Available range: 0 to 300. Default - 200 -->
<object_contact_sync_radius>200</object_contact_sync_radius>

<!-- This parameter sets the amount of extrapolation that clients will apply to remote vehicles. This can reduce
some of the latency induced location disparency by predicting where the remote vehicles will probably be.
Depending on the gamemode, an incorrect prediction may have a negative effect. Therefore this setting
Expand Down
4 changes: 0 additions & 4 deletions Server/mods/deathmatch/mtaserver.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@
Available range: 0 to 130. Default - 30 -->
<vehicle_contact_sync_radius>30</vehicle_contact_sync_radius>

<!-- This parameter specifies the radius in which any contact with a object will turn the player into its syncer.
Available range: 0 to 300. Default - 200 -->
<object_contact_sync_radius>200</object_contact_sync_radius>

<!-- This parameter sets the amount of extrapolation that clients will apply to remote vehicles. This can reduce
some of the latency induced location disparency by predicting where the remote vehicles will probably be.
Depending on the gamemode, an incorrect prediction may have a negative effect. Therefore this setting
Expand Down
2 changes: 0 additions & 2 deletions Shared/mods/deathmatch/logic/CTickRateSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ struct CTickRateSettings
iPedSyncerDistance = 100;
iUnoccupiedVehicleSyncerDistance = 130;
iVehicleContactSyncRadius = 30;
iObjectContactSyncRadius = 200;
}

int iPureSync;
Expand All @@ -42,7 +41,6 @@ struct CTickRateSettings
int iPedSyncerDistance;
int iUnoccupiedVehicleSyncerDistance;
int iVehicleContactSyncRadius;
int iObjectContactSyncRadius;
};

extern CTickRateSettings g_TickRateSettings;