make player and client bound together
this cleansup and allows rejoining a running server
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user