2019-04-10 23:41:37 +00:00
|
|
|
use vek::*;
|
2019-04-19 19:32:47 +00:00
|
|
|
use super::ClientState;
|
2019-04-10 17:23:27 +00:00
|
|
|
use crate::comp;
|
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-19 19:32:47 +00:00
|
|
|
Connect { player: comp::Player },
|
|
|
|
Character(comp::Character),
|
|
|
|
RequestState(ClientState),
|
2019-03-05 18:39:18 +00:00
|
|
|
Ping,
|
|
|
|
Pong,
|
2019-03-03 22:02:38 +00:00
|
|
|
Chat(String),
|
2019-04-17 17:32:29 +00:00
|
|
|
PlayerAnimation(comp::character::AnimationHistory),
|
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 {
|
|
|
|
key: Vec3<i32>,
|
|
|
|
},
|
2019-03-03 22:02:38 +00:00
|
|
|
Disconnect,
|
|
|
|
}
|