mirror of
https://github.com/Ukendio/jecs.git
synced 2026-03-18 00:44:32 +00:00
Ensure that world:exists uses the safe try_get_any
This commit is contained in:
parent
4b10b622bf
commit
f9764634e6
1 changed files with 5 additions and 1 deletions
|
|
@ -3718,7 +3718,11 @@ local function world_new(DEBUG: boolean?)
|
|||
end
|
||||
|
||||
local function world_exists(world: world, entity: i53): boolean
|
||||
return entity_index_try_get_any(entity) ~= nil
|
||||
local r = entity_index_try_get_any(entity)
|
||||
if not r or r.dense == 0 then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local function world_contains(world: world, entity: i53): boolean
|
||||
|
|
|
|||
Loading…
Reference in a new issue