Skip to content

Commit

Permalink
fix(server/vehicle-persistence): get session id while vehicle exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Oct 22, 2024
1 parent 372ad6d commit 6c5cf05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/vehicle-persistence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ end

AddEventHandler('entityRemoved', function(entity)
if not Entity(entity).state.persisted then return end
local sessionId = Entity(entity).state.sessionId
local coords = GetEntityCoords(entity)
local heading = GetEntityHeading(entity)
local bucket = GetEntityRoutingBucket(entity)
Expand All @@ -106,7 +107,6 @@ AddEventHandler('entityRemoved', function(entity)
local vehicleId = getVehicleId(entity)
if not vehicleId then return end

local sessionId = Entity(entity).state.sessionId
local playerVehicle = exports.qbx_vehicles:GetPlayerVehicle(vehicleId)

if DoesEntityExist(entity) then
Expand Down

0 comments on commit 6c5cf05

Please sign in to comment.