Fixed serialization bug with entity id
This commit is contained in:
@@ -53,7 +53,7 @@ Renderable :: struct {
|
|||||||
MAX_CHILDREN :: 16;
|
MAX_CHILDREN :: 16;
|
||||||
|
|
||||||
Entity :: struct {
|
Entity :: struct {
|
||||||
id: Entity_Id; @Hide
|
id: Entity_Id; @Hide @DontSerialize
|
||||||
type : Type;
|
type : Type;
|
||||||
|
|
||||||
enabled: bool = true;
|
enabled: bool = true;
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ register_entity :: (scene: *Scene, entity: *Entity, id: Entity_Id = -1) {
|
|||||||
entity.id = next_entity_id;
|
entity.id = next_entity_id;
|
||||||
next_entity_id += 1;
|
next_entity_id += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
array_add(*scene.entities, entity);
|
array_add(*scene.entities, entity);
|
||||||
|
|
||||||
#if NETWORKING {
|
#if NETWORKING {
|
||||||
|
|||||||
Reference in New Issue
Block a user