From f533264eabc2457e0e570da0970c7d9b30aa3eb5 Mon Sep 17 00:00:00 2001 From: r4sheed <25135303+r4sheed@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:09:22 +0100 Subject: [PATCH] Skip passengers in the unoccupied sync distance check Passengers can't send unoccupied sync for seat 0 (it's dropped in PlayerUnoccupiedSyncHandler), but updateFromUnoccupied still counts them when it looks for the closest player. So if a passenger is the closest one to an empty car, nobody's sync gets accepted and the server keeps the car where it was. Easy to hit with a tow truck pushing a car while someone sits in the passenger seat. This skips passengers in that loop. Nothing changes when no passenger is closest. --- Server/Components/Vehicles/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Components/Vehicles/vehicle.cpp b/Server/Components/Vehicles/vehicle.cpp index 9eaebd407..6286bd0bd 100644 --- a/Server/Components/Vehicles/vehicle.cpp +++ b/Server/Components/Vehicles/vehicle.cpp @@ -272,7 +272,7 @@ bool Vehicle::updateFromUnoccupied(const VehicleUnoccupiedSyncPacket& unoccupied auto& entries = streamedFor_.entries(); for (IPlayer* comparable : entries) { - if (comparable == &player) + if (comparable == &player || comparable->getState() == PlayerState_Passenger) { continue; }