2019-04-19 19:32:47 +00:00
|
|
|
use super::ClientState;
|
2019-04-10 17:23:27 +00:00
|
|
|
use crate::comp;
|
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-05-25 21:13:38 +00:00
|
|
|
Attack,
|
|
|
|
Respawn,
|
2019-04-19 19:32:47 +00:00
|
|
|
RequestState(ClientState),
|
2019-05-19 00:45:02 +00:00
|
|
|
SetViewDistance(u32),
|
2019-03-05 18:39:18 +00:00
|
|
|
Ping,
|
|
|
|
Pong,
|
2019-03-03 22:02:38 +00:00
|
|
|
Chat(String),
|
2019-05-17 20:47:58 +00:00
|
|
|
PlayerAnimation(comp::AnimationInfo),
|
2019-03-05 18:39:18 +00:00
|
|
|
PlayerPhysics {
|
2019-04-10 17:23:27 +00:00
|
|
|
pos: comp::phys::Pos,
|
|
|
|
vel: comp::phys::Vel,
|
|
|
|
dir: comp::phys::Dir,
|
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,
|
|
|
|
}
|