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 | |
| parent | 833f306e8b8faddd232b5c736b2134ed08adcb6c (diff) | |
| download | azalea-drasl-24babbdbe5b54fec277b48833cf8fec9928ca873.tar.xz | |
GameTick should only happen after Update
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/client.rs | 3 | ||||
| -rw-r--r-- | azalea-client/src/disconnect.rs | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 63026c96..c81f6f28 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -869,6 +869,7 @@ async fn run_schedule_loop( let mut ecs = ecs.lock(); // if last tick is None or more than 50ms ago, run the GameTick schedule + ecs.run_schedule(outer_schedule_label); if last_tick .map(|last_tick| last_tick.elapsed() > Duration::from_millis(50)) .unwrap_or(true) @@ -881,8 +882,6 @@ async fn run_schedule_loop( ecs.run_schedule(GameTick); } - ecs.run_schedule(outer_schedule_label); - ecs.clear_trackers(); } } 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 |
