aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenauxg <19689618+Henauxg@users.noreply.github.com>2022-11-17 14:52:24 +0100
committerHenauxg <19689618+Henauxg@users.noreply.github.com>2022-11-17 14:52:24 +0100
commit55ba2ad3285f88f237539279b84d01bd63f1c646 (patch)
treee3f17f8efeeea9e25169c42c7854ea31d9869483 /src
parent231096a4960da37a87fa3a115c2319a7863e91a4 (diff)
[client] Generate bevy events in CoreStage::PreUpdate
Diffstat (limited to 'src')
-rw-r--r--src/client.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs
index 2f7eda5..7fccc7a 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -128,6 +128,7 @@ pub(crate) struct ConnectionSpawnConfig {
from_server_sender: mpsc::Sender<Bytes>,
}
+#[derive(Debug)]
pub struct Connection {
state: ConnectionState,
// TODO Perf: multiple channels
@@ -542,7 +543,7 @@ impl Plugin for QuinnetClientPlugin {
.add_event::<CertConnectionAbortEvent>()
// StartupStage::PreStartup so that resources created in commands are available to default startup_systems
.add_startup_system_to_stage(StartupStage::PreStartup, create_client)
- .add_system(update_sync_client);
+ .add_system_to_stage(CoreStage::PreUpdate, update_sync_client);
if app.world.get_resource_mut::<AsyncRuntime>().is_none() {
app.insert_resource(AsyncRuntime(