Skip to content

Commit

Permalink
fix(client/utils): wrong id returned by getDoorIdFromEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Mar 1, 2024
1 parent b26ffee commit ac1a814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local function getDoorFromEntity(data)
end

exports('getClosestDoorId', function() return ClosestDoor?.id end)
exports('getDoorIdFromEntity', function(entityId) return getDoorFromEntity(entityId)?.doorId end) -- same as Entity(entityId).state.doorId
exports('getDoorIdFromEntity', function(entityId) return getDoorFromEntity(entityId)?.id end) -- same as Entity(entityId).state.doorId

local function entityIsNotDoor(data)
local entity = type(data) == 'number' and data or data.entity
Expand Down

0 comments on commit ac1a814

Please sign in to comment.