Fix redundant checks in world_remove

This commit is contained in:
lolmanurfunny 2025-02-20 23:43:14 -05:00
parent 3815c62442
commit b53ecba66d

View file

@ -899,7 +899,7 @@ local function world_remove(world: World, entity: i53, id: i53)
end
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 on_remove = idr.hooks.on_remove
if on_remove then