From 24babbdbe5b54fec277b48833cf8fec9928ca873 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 21 Feb 2025 20:17:47 +0000 Subject: GameTick should only happen after Update --- azalea-client/src/disconnect.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'azalea-client/src/disconnect.rs') diff --git a/azalea-client/src/disconnect.rs b/azalea-client/src/disconnect.rs index 5b377ce2..06648691 100644 --- a/azalea-client/src/disconnect.rs +++ b/azalea-client/src/disconnect.rs @@ -1,7 +1,7 @@ //! Disconnect a client from the server. use azalea_chat::FormattedText; -use azalea_entity::LocalEntity; +use azalea_entity::{EntityBundle, LocalEntity}; use bevy_app::{App, Plugin, PostUpdate}; use bevy_ecs::{ component::Component, @@ -50,6 +50,7 @@ pub fn remove_components_from_disconnected_players( commands .entity(*entity) .remove::() + .remove::() // this makes it close the tcp connection .remove::() // swarm detects when this tx gets dropped to fire SwarmEvent::Disconnect -- cgit v1.2.3