This commit is contained in:
griffi-gh 2023-03-07 23:06:59 +01:00
parent 5725e8be26
commit e7b7797144
3 changed files with 2 additions and 4 deletions

View file

@ -1,6 +1,5 @@
use shipyard::{UniqueView, UniqueViewMut};
use kubi_shared::networking::messages::{ClientToServerMessage, ServerToClientMessage, InitData};
use kubi_udp::server::ServerEvent;
use crate::{server::{ServerEvents, UdpServer}, config::ConfigTable, util::log_error};
pub fn authenticate_players(

View file

@ -1,7 +1,6 @@
use shipyard::{Component, EntityId};
use hashbrown::HashMap;
use nohash_hasher::BuildNoHashHasher;
use kubi_udp::{ClientId, ClientIdRepr};
#[derive(Component)]
pub struct Client(ClientId);

View file

@ -83,8 +83,8 @@ pub fn inject_network_responses_into_manager_queue(
events: View<NetworkEvent>
) {
for event in events.iter() {
if let ClientEvent::MessageReceived(ServerToClientMessage::ChunkResponse { chunk, data, queued }) = &event.0 {
let position = IVec3::from_array(*chunk);
if let ClientEvent::MessageReceived(ServerToClientMessage::ChunkResponse { &chunk, data, queued }) = &event.0 {
let position = IVec3::from_array(chunk);
manager.add_sussy_response(ChunkTaskResponse::LoadedChunk {
position,
chunk_data: data.clone(),