Trigger constructors when cloning an ecs entity

This commit is contained in:
Nikita Lisitsa 2024-05-20 16:43:11 +03:00
parent 2423547973
commit 1da8e341c5

View file

@ -47,11 +47,14 @@ namespace psemek::ecs
if (table->get_iteration_data())
table = table->get_delayed_table();
auto id = entity_list_.create(table, table->row_count());
auto row = table->row_count();
auto id = entity_list_.create(table, row);
handle handle{id, entity_list_.get_entities()[id].epoch};
table->copy_row(handle, data.table, data.row);
table->trigger_constructors(*this, row);
return handle;
}