summaryrefslogtreecommitdiff
path: root/src/to_clt.rs
diff options
context:
space:
mode:
authorLizzy Fleckenstein <eliasfleckenstein@web.de>2023-02-15 23:44:21 +0100
committerLizzy Fleckenstein <eliasfleckenstein@web.de>2023-02-15 23:54:40 +0100
commit58f9e0a0005aab59dfd987bddb09952f3a5c195b (patch)
tree3809aeb1459d86edba39942767ddace0501e83d2 /src/to_clt.rs
parent03b44a9e68f76a9e0aa612b9597cc879bbc37157 (diff)
downloadmt_net-58f9e0a0005aab59dfd987bddb09952f3a5c195b.tar.xz
Add wrappers around mt_rudp
Diffstat (limited to 'src/to_clt.rs')
-rw-r--r--src/to_clt.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/to_clt.rs b/src/to_clt.rs
index 3792018..5f99be3 100644
--- a/src/to_clt.rs
+++ b/src/to_clt.rs
@@ -285,7 +285,7 @@ pub enum ToCltPkt {
flags: EnumSet<HudFlag>,
mask: EnumSet<HudFlag>,
} = 76,
- SetHotbarParam(HotbarParam) = 77,
+ HotbarParam(HotbarParam) = 77,
Breath {
breath: u16,
} = 78,
@@ -345,3 +345,19 @@ pub enum ToCltPkt {
} = 97,
MinimapModes(MinimapModesPkt) = 98,
}
+
+impl PktInfo for ToCltPkt {
+ fn pkt_info(&self) -> (u8, bool) {
+ use ToCltPkt::*;
+
+ match self {
+ BlockData { .. } | Media { .. } => (2, true),
+ AddHud { .. }
+ | ChangeHud { .. }
+ | RemoveHud { .. }
+ | HudFlags { .. }
+ | HotbarParam(_) => (1, true),
+ _ => (0, true),
+ }
+ }
+}