mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Fix player input change serdes, implement explicit disconnect #30
This commit is contained in:
@@ -23,7 +23,7 @@ pub async fn handler(init_ctx: &crate::InitConfig) -> crate::handler::LnlEventHa
|
||||
{rlnl::event_code::NetworkEvent::OnPlayerInputChanged as i16},
|
||||
{rlnl::event_code::NetworkEvent::OnServerReceivedInputChange as i16},
|
||||
{literustlib::packet::Property::Unreliable as u8},
|
||||
rlnl::events::ingame::MultiPlayerInputChanged,
|
||||
rlnl::events::ingame::PlayerIdAndInputData,
|
||||
>::handler(init_ctx))
|
||||
.add(crate::handlers::DatalessBroadcaster::<
|
||||
true,
|
||||
@@ -166,7 +166,7 @@ pub fn log_lnl_send_failure(result: std::io::Result<usize>) {
|
||||
mod _broadcast_impls {
|
||||
use crate::Broadcastable;
|
||||
|
||||
impl Broadcastable for rlnl::events::ingame::MultiPlayerInputChanged {}
|
||||
impl Broadcastable for rlnl::events::ingame::PlayerIdAndInputData {}
|
||||
impl Broadcastable for rlnl::events::ingame::WeaponFireEffect {}
|
||||
impl Broadcastable for rlnl::events::ingame::FireMiss {}
|
||||
impl Broadcastable for rlnl::events::ingame::MultipleFireMisses {}
|
||||
|
||||
@@ -268,7 +268,7 @@ impl <L: super::CustomGameLogic> GenericGamemodeEngine<L> {
|
||||
}
|
||||
is_engaged = has_active_connections;
|
||||
}
|
||||
conn.connection.connection.disconnect();
|
||||
conn.connection.connection.goodbye(&conn.connection.sender).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user