Fixed serialization bug with duplicate entity ids
This commit is contained in:
@@ -54,10 +54,15 @@ load_scene :: (name: string) -> *Scene {
|
||||
files.allocator = temp;
|
||||
visit_files(path, true, *files, visitor);
|
||||
|
||||
highest : Entity_Id = 0;
|
||||
for file: files {
|
||||
deserialize_entity(scene, file.id, file.full_path);
|
||||
if file.id > highest {
|
||||
highest = file.id;
|
||||
}
|
||||
}
|
||||
|
||||
next_entity_id = cast(Entity_Id)(highest + 1);
|
||||
|
||||
calculate_aabbs(scene);
|
||||
make_sure_nothing_collides(scene);
|
||||
|
||||
Reference in New Issue
Block a user