2019-04-19 19:32:47 +00:00
|
|
|
use super::ClientState;
|
2019-04-10 17:23:27 +00:00
|
|
|
use crate::comp;
|
2019-07-02 18:19:16 +00:00
|
|
|
use crate::terrain::block::Block;
|
2019-04-29 20:37:19 +00:00
|
|
|
use vek::*;
|
2019-03-05 18:39:18 +00:00
|
|
|
|
2019-04-19 19:32:47 +00:00
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
2019-03-03 22:02:38 +00:00
|
|
|
pub enum ClientMsg {
|
2019-04-29 20:37:19 +00:00
|
|
|
Register {
|
|
|
|
player: comp::Player,
|
|
|
|
},
|
2019-05-12 21:21:18 +00:00
|
|
|
Character {
|
|
|
|
name: String,
|
2019-05-15 16:06:58 +00:00
|
|
|
body: comp::Body,
|
2019-05-12 21:21:18 +00:00
|
|
|
},
|
2019-06-09 14:20:20 +00:00
|
|
|
Controller(comp::Controller),
|
2019-04-19 19:32:47 +00:00
|
|
|
RequestState(ClientState),
|
2019-05-19 00:45:02 +00:00
|
|
|
SetViewDistance(u32),
|
2019-07-02 18:19:16 +00:00
|
|
|
BreakBlock(Vec3<i32>),
|
|
|
|
PlaceBlock(Vec3<i32>, Block),
|
2019-03-05 18:39:18 +00:00
|
|
|
Ping,
|
|
|
|
Pong,
|
2019-03-03 22:02:38 +00:00
|
|
|
Chat(String),
|
2019-03-05 18:39:18 +00:00
|
|
|
PlayerPhysics {
|
2019-06-14 15:27:05 +00:00
|
|
|
pos: comp::Pos,
|
|
|
|
vel: comp::Vel,
|
|
|
|
ori: comp::Ori,
|
2019-03-05 18:39:18 +00:00
|
|
|
},
|
2019-04-10 23:41:37 +00:00
|
|
|
TerrainChunkRequest {
|
2019-05-17 17:44:30 +00:00
|
|
|
key: Vec2<i32>,
|
2019-04-10 23:41:37 +00:00
|
|
|
},
|
2019-03-03 22:02:38 +00:00
|
|
|
Disconnect,
|
|
|
|
}
|