fix bug and make scaling look tight

This commit is contained in:
ntr
2019-02-22 14:34:55 +11:00
parent caf827e42b
commit 96f31346c5
3 changed files with 30 additions and 28 deletions
+2 -1
View File
@@ -78,6 +78,7 @@ impl Rpc {
"instance_join" => Rpc::instance_join(data, &mut tx, account.unwrap(), client),
"player_state" => Rpc::player_state(data, &mut tx, account.unwrap(), client),
"player_cryps_set" => Rpc::player_cryps_set(data, &mut tx, account.unwrap(), client),
"player_vbox_accept" => Rpc::player_vbox_accept(data, &mut tx, account.unwrap(), client),
"player_vbox_apply" => Rpc::player_vbox_apply(data, &mut tx, account.unwrap(), client),
"player_vbox_drop" => Rpc::player_vbox_drop(data, &mut tx, account.unwrap(), client),
@@ -282,7 +283,7 @@ impl Rpc {
}
fn player_cryps_set(data: Vec<u8>, tx: &mut Transaction, account: Account, _client: &mut WebSocket<TcpStream>) -> Result<RpcResponse, Error> {
let msg = from_slice::<PlayerStateMsg>(&data).or(Err(err_msg("invalid params")))?;
let msg = from_slice::<PlayerCrypsSetMsg>(&data).or(Err(err_msg("invalid params")))?;
let response = RpcResponse {
method: "player_state".to_string(),