From 58d862e406014bc8aed1ac4db0ddd90d1a6ae867 Mon Sep 17 00:00:00 2001 From: Manason Date: Thu, 28 Nov 2024 08:17:38 -0800 Subject: [PATCH] fix(vehicle-persistence): use diff provided tyres changes --- server/vehicle-persistence.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/server/vehicle-persistence.lua b/server/vehicle-persistence.lua index c16148b67..d25b4d160 100644 --- a/server/vehicle-persistence.lua +++ b/server/vehicle-persistence.lua @@ -65,14 +65,7 @@ RegisterNetEvent('qbx_core:server:vehiclePropsChanged', function(netId, diff) end if diff.tyres then - local damage = {} - for i = 0, 7 do - if IsVehicleTyreBurst(vehicle, i, false) then - damage[i] = IsVehicleTyreBurst(vehicle, i, true) and 2 or 1 - end - end - - props.tyres = damage + props.tyres = diff.tyres ~= 'deleted' and diff.tyres or nil end exports.qbx_vehicles:SaveVehicle(vehicle, {