Don't immediately send heartbeat
All checks were successful
CI / Formatting (push) Successful in 1m11s
All checks were successful
CI / Formatting (push) Successful in 1m11s
This commit is contained in:
parent
591cfee715
commit
e58629c2f1
5 changed files with 50 additions and 46 deletions
|
@ -4,11 +4,9 @@ use bevy::prelude::*;
|
|||
use uuid::Uuid;
|
||||
|
||||
use super::{
|
||||
io::{
|
||||
Config, InboundPacket, OutboundPacket, handle_network_input, handle_network_output,
|
||||
heartbeat, timeouts,
|
||||
},
|
||||
peer::{Peer, PeerChangeEvent, PeerMap, handle_peer_change},
|
||||
io::{Config, handle_network_input, handle_network_output, heartbeat, timeouts},
|
||||
packet::{InboundPacket, OutboundPacket},
|
||||
peer::{Peer, PeerChangeEvent, PeerMap, handle_new_peer, handle_peer_change},
|
||||
queues::{NetworkReceive, NetworkSend},
|
||||
socket::bind_socket,
|
||||
};
|
||||
|
@ -42,7 +40,7 @@ impl Plugin for NetIOPlugin {
|
|||
)
|
||||
.add_systems(
|
||||
FixedUpdate,
|
||||
(heartbeat, timeouts).run_if(in_state(NetworkState::MultiPlayer)),
|
||||
(heartbeat, timeouts, handle_new_peer).run_if(in_state(NetworkState::MultiPlayer)),
|
||||
)
|
||||
.add_systems(
|
||||
FixedPostUpdate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue