diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-04-08 11:48:54 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-04-08 12:10:44 +0200 |
commit | 7643fb90dcf148605e3309c2007cd8a4c27914fa (patch) | |
tree | 5caf8100b3d99418dad1e284398392aa83fa29bb /src/server.rs | |
parent | 80109d0da833842695948fe404489ea33f9dcfdb (diff) |
chore: update lightyear to 0.13.0
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server.rs b/src/server.rs index 003b5e5..a509f28 100644 --- a/src/server.rs +++ b/src/server.rs @@ -61,7 +61,13 @@ impl Plugin for ServerPlugin { }) .add_systems(Startup, setup) .add_systems(Update, (connects, disconnects)) - .add_systems(Update, (receive_message_select_champion, receive_message_select_faction)) + .add_systems( + Update, + ( + receive_message_select_champion, + receive_message_select_faction, + ), + ) .add_systems(FixedUpdate, timers_tick) .add_systems(FixedUpdate, effective_stats.after(buffs_despawn)) .add_systems(FixedUpdate, health_regen.after(timers_tick)) @@ -984,12 +990,12 @@ fn nexus_spawn_minions( } } -fn generate_client_ids<const N: usize>(entity_map: &ResMut<EntityMap>) -> [u64; N] { +fn generate_client_ids<const N: usize>(entity_map: &ResMut<EntityMap>) -> [ClientId; N] { let mut rng = rand::thread_rng(); let mut k = 0; let mut client_ids = vec![]; while k < N { - let client_id = rng.gen(); + let client_id = ClientId::Local(rng.gen()); if entity_map.0.contains_key(&client_id) { continue; } |