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 shipyard::{UniqueView, UniqueViewMut};
use kubi_shared::networking::messages::{ClientToServerMessage, ServerToClientMessage, InitData}; use kubi_shared::networking::messages::{ClientToServerMessage, ServerToClientMessage, InitData};
use kubi_udp::server::ServerEvent;
use crate::{server::{ServerEvents, UdpServer}, config::ConfigTable, util::log_error}; use crate::{server::{ServerEvents, UdpServer}, config::ConfigTable, util::log_error};
pub fn authenticate_players( pub fn authenticate_players(

View file

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

View file

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