added persistence and networking

Signed-off-by: Sienna Meridian Satterwhite <sienna@r3t.io>
This commit is contained in:
2025-12-09 22:21:58 +00:00
parent 260ceae4c5
commit 2847e7236f
18 changed files with 1787 additions and 33528 deletions

View File

@@ -199,11 +199,15 @@ pub fn apply_full_state(
continue;
}
// Spawn entity with NetworkedEntity component
// Spawn entity with NetworkedEntity and Persisted components
// This ensures entities received via FullState are persisted locally
let entity = commands
.spawn(NetworkedEntity::with_id(
entity_state.entity_id,
entity_state.owner_node_id,
.spawn((
NetworkedEntity::with_id(
entity_state.entity_id,
entity_state.owner_node_id,
),
crate::persistence::Persisted::with_id(entity_state.entity_id),
))
.id();