Add id for entity

This commit is contained in:
Lol3rrr
2024-09-26 17:03:45 +02:00
parent a2b3ee1845
commit 7114124096

View File

@@ -8,6 +8,7 @@ pub struct EntityContext {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct EntityState { pub struct EntityState {
pub id: i32,
pub class: String, pub class: String,
pub cls: u32, pub cls: u32,
pub props: Vec<EntityProp>, pub props: Vec<EntityProp>,
@@ -100,6 +101,7 @@ impl EntityContext {
Ok(Some(( Ok(Some((
n_updates, n_updates,
EntityState { EntityState {
id: entity_id,
class: class.name.clone(), class: class.name.clone(),
cls: entity.cls, cls: entity.cls,
props: fields, props: fields,