Skip to content

Commit 2d66681

Browse files
committed
Small change in addEntityChild
1 parent 6d60144 commit 2d66681

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

engine/core/registry/EntityRegistry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ void EntityRegistry::addEntityChild(Entity parent, Entity child, bool changeTran
326326
if (childSignature.test(getComponentId<Transform>())){
327327
Transform& transformChild = componentManager.getComponent<Transform>(child);
328328

329-
transformChild.needUpdate = true;
330-
331329
if (transformChild.parent == parent){
332330
return;
333331
}
334332

333+
transformChild.needUpdate = true;
334+
335335
if (parent == NULL_ENTITY){
336336
size_t newIndex = findBranchLastIndex(findOldestParent(child)) + 1;
337337
moveChildToIndex(child, newIndex, true);

0 commit comments

Comments
 (0)