diff options
| author | mat <git@matdoes.dev> | 2025-02-21 20:17:47 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-02-21 20:17:47 +0000 |
| commit | 24babbdbe5b54fec277b48833cf8fec9928ca873 (patch) | |
| tree | f2368412d09857af9b6ca649de0fcf4b703bb5ec /azalea-client/src/disconnect.rs | |
| parent | 833f306e8b8faddd232b5c736b2134ed08adcb6c (diff) | |
| download | azalea-drasl-24babbdbe5b54fec277b48833cf8fec9928ca873.tar.xz | |
GameTick should only happen after Update
Diffstat (limited to 'azalea-client/src/disconnect.rs')
| -rw-r--r-- | azalea-client/src/disconnect.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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::<JoinedClientBundle>() + .remove::<EntityBundle>() // this makes it close the tcp connection .remove::<RawConnection>() // swarm detects when this tx gets dropped to fire SwarmEvent::Disconnect |
