mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
20 lines
726 B
Rust
20 lines
726 B
Rust
|
use specs::Component;
|
||
|
use specs_idvs::IdvStorage;
|
||
|
use vek::Vec2;
|
||
|
|
||
|
/// Curing the runtime of a tick, multiple systems can request a chunk to be
|
||
|
/// synced to a client E.g. msg::terrain will do so, when a client requested a
|
||
|
/// chunk that already exist terrain will do so when a chunk came back from
|
||
|
/// ChunkGeneration. All those sends are deferred by this queue.
|
||
|
/// Deferring allows us to remove code duplication and maybe serialize ONCE,
|
||
|
/// send to MULTIPLE clients TODO: store a urgent flag and seperate even more, 5
|
||
|
/// ticks vs 5 seconds
|
||
|
#[derive(Default, Clone, Debug, PartialEq)]
|
||
|
pub struct ChunkSendQueue {
|
||
|
pub chunks: Vec<Vec2<i32>>,
|
||
|
}
|
||
|
|
||
|
impl Component for ChunkSendQueue {
|
||
|
type Storage = IdvStorage<Self>;
|
||
|
}
|