mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Fix redundant checks in world_remove (#198)
This commit is contained in:
parent
3815c62442
commit
4c5e5e1968
1 changed files with 1 additions and 1 deletions
|
@ -899,7 +899,7 @@ local function world_remove(world: World, entity: i53, id: i53)
|
||||||
end
|
end
|
||||||
local to = archetype_traverse_remove(world, id, from)
|
local to = archetype_traverse_remove(world, id, from)
|
||||||
|
|
||||||
if from and not (from == to) then
|
if from ~= to then
|
||||||
local idr = world.component_index[id]
|
local idr = world.component_index[id]
|
||||||
local on_remove = idr.hooks.on_remove
|
local on_remove = idr.hooks.on_remove
|
||||||
if on_remove then
|
if on_remove then
|
||||||
|
|
Loading…
Reference in a new issue