1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add some semblance of match end

This commit is contained in:
NG (Graham)
2025-07-21 22:33:12 -04:00
parent 3aa57dfc0d
commit a452d37d22
14 changed files with 471 additions and 91 deletions

View File

@@ -6,6 +6,9 @@ pub enum GameMessage {
response: tokio::sync::oneshot::Sender<Option<ErrorMessage>>,
sender: std::sync::Arc<literustlib_server::DataSender<crate::PacketData>>,
},
EndConnection {
user_id: i32,
},
LoadingProgress {
user_id: i32,
user_name: String,
@@ -39,13 +42,13 @@ pub enum GameMessage {
user_id: i32,
event: rlnl::event_code::NetworkEvent,
property: literustlib::packet::Property,
data: Option<Box<dyn byteserde::ser_heap::ByteSerializeHeap + Send + Sync>>,
data: Option<Box<dyn crate::Broadcastable>>,
},
RebroadcastRlnl {
skip_user_id: i32,
event: rlnl::event_code::NetworkEvent,
property: literustlib::packet::Property,
data: Option<Box<dyn byteserde::ser_heap::ByteSerializeHeap + Send + Sync>>,
data: Option<Box<dyn crate::Broadcastable>>,
},
Motion {
user_id: i32,
@@ -60,6 +63,7 @@ impl GameMessage {
Self::NewConnection { user, .. } => {
user.user_id()
}
Self::EndConnection { user_id, .. } => *user_id,
Self::LoadingProgress { user_id, .. } => *user_id,
Self::RequestLoadingProgress { user_id, .. } => *user_id,
Self::WeaponSelect { user_id, .. } => *user_id,