mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[ecs] Support adding null hierarchies to non-root
As an implementation detail, inserting null hierarchies (src hierarchy is null) is supported for ease of hierarchy construction from data. No component data is copied, only the child and parent indices and counts are updated.
This commit is contained in:
parent
52b09e81cd
commit
80c0beff89
1 changed files with 3 additions and 1 deletions
|
@ -271,7 +271,9 @@ Hierarchy_InsertHierarchy (hierarchy_t *dst, const hierarchy_t *src,
|
|||
Sys_Error ("attempt to insert root in non-empty hierarchy");
|
||||
}
|
||||
hierarchy_open (dst, 0, 1);
|
||||
if (src) {
|
||||
hierarchy_move (dst, src, 0, srcRoot, 1);
|
||||
}
|
||||
dst->parentIndex[0] = nullent;
|
||||
dst->childIndex[0] = 1;
|
||||
dst->childCount[0] = 0;
|
||||
|
|
Loading…
Reference in a new issue