Trigger constructors when cloning an ecs entity
This commit is contained in:
parent
2423547973
commit
1da8e341c5
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue