aboutsummaryrefslogtreecommitdiffstats
path: root/src/server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs12
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;
}