make player and client bound together

this cleansup and allows rejoining a running server
This commit is contained in:
2025-12-08 20:51:46 -05:00
parent ff52258ad2
commit 845cae4389
2 changed files with 11 additions and 2 deletions

View File

@@ -189,3 +189,11 @@ impl TbMapIdCounter {
#[derive(Resource, Reflect, Default, Deref, DerefMut)]
#[reflect(Resource)]
pub struct TbMapEntityMapping(pub HashMap<u64, Entity>);
#[derive(Component)]
#[relationship(relationship_target = ClientOwns)]
pub struct OwnedByClient(pub Entity);
#[derive(Component)]
#[relationship_target(relationship = OwnedByClient, linked_spawn)]
pub struct ClientOwns(Entity);