Create initial multiplayer server skeleton

This commit is contained in:
NG (Graham) committed 2025-07-01 20:04:11 -04:00
1 parent 9f74a2e76a
commit c2dc6088a0
11 files changed
+537 -32

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#[repr(i16)]
#[derive(Debug, Clone, Copy)]
pub enum MessageType {
ClientMsg = 48,
ServerMsg = 49,
RobotMotion = 50,
}
impl MessageType {
pub fn from_i16(num: i16) -> Option<Self> {
match num {
48 => Some(Self::ClientMsg),
49 => Some(Self::ServerMsg),
50 => Some(Self::RobotMotion),
_ => None,
}
}
}