mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-01 19:28:43 -06:00
.
This commit is contained in:
parent
5725e8be26
commit
e7b7797144
|
@ -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(
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
Loading…
Reference in a new issue