aboutsummaryrefslogtreecommitdiff
path: root/server/client-lib/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-16 20:26:42 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-16 20:26:42 +0200
commitef010d6317dcbf9df84c909bab72c64a6eabacb2 (patch)
treeaa48301ac95abe7a233e1d7174d9f9f80be37829 /server/client-lib/src/lib.rs
parente95418c3e146a0a0ea82b7a99b642745c29bba5a (diff)
downloadhurrycurry-ef010d6317dcbf9df84c909bab72c64a6eabacb2.tar
hurrycurry-ef010d6317dcbf9df84c909bab72c64a6eabacb2.tar.bz2
hurrycurry-ef010d6317dcbf9df84c909bab72c64a6eabacb2.tar.zst
Send _list of_ players in progress reports
Diffstat (limited to 'server/client-lib/src/lib.rs')
-rw-r--r--server/client-lib/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/client-lib/src/lib.rs b/server/client-lib/src/lib.rs
index 4639d2ea..515b2e38 100644
--- a/server/client-lib/src/lib.rs
+++ b/server/client-lib/src/lib.rs
@@ -25,19 +25,19 @@ use hurrycurry_protocol::{
};
use spatial_index::SpatialIndex;
use std::{
- collections::{HashMap, HashSet},
+ collections::{BTreeSet, HashMap, HashSet},
sync::Arc,
time::Instant,
};
use crate::gamedata_index::GamedataIndex;
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub struct Involvement {
pub position: f32,
pub speed: f32,
pub recipe: RecipeIndex,
- pub player: Option<PlayerID>,
+ pub players: BTreeSet<PlayerID>,
pub warn: bool,
}
@@ -145,13 +145,13 @@ impl Game {
PacketC::SetProgress {
item,
position,
- player,
+ players,
speed,
warn,
} => {
if let Some(Some(item)) = self.get_item(item) {
item.active = Some(Involvement {
- player,
+ players,
speed,
warn,
position,