mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-16 06:11:15 +00:00
[ecs] Invalidate entity before removing components
It turns out that the fixes for other problems related to removing hierarchy reference components fixed the problem moving the entity invalidation fixed, and invalidating the entity late somehow broke the sprite renderer (at least in glsl).
This commit is contained in:
parent
9982eb629d
commit
e19e7cad0c
1 changed files with 3 additions and 3 deletions
|
@ -209,13 +209,13 @@ ECS_DelEntity (ecs_registry_t *registry, uint32_t ent)
|
|||
}
|
||||
uint32_t next = registry->next | Ent_NextGen (Ent_Generation (ent));
|
||||
uint32_t id = Ent_Index (ent);
|
||||
registry->entities[id] = next;
|
||||
registry->next = id;
|
||||
registry->available++;
|
||||
|
||||
for (uint32_t i = 0; i < registry->components.size; i++) {
|
||||
Ent_RemoveComponent (ent, i, registry);
|
||||
}
|
||||
registry->entities[id] = next;
|
||||
registry->next = id;
|
||||
registry->available++;
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
|
|
Loading…
Reference in a new issue