From c0ab09af747fc431dfb459ede30788cb9cd1c56b Mon Sep 17 00:00:00 2001 From: BlockMen Date: Fri, 11 Apr 2014 15:32:46 +0200 Subject: Add player:set_eye_offset() by @MirceaKitsune and clean up --- src/client.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 4f392ad7a..dbe959067 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1928,6 +1928,17 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) player->local_animations[3] = readV2F1000(is); player->local_animation_speed = readF1000(is); } + else if(command == TOCLIENT_EYE_OFFSET) + { + std::string datastring((char *)&data[2], datasize - 2); + std::istringstream is(datastring, std::ios_base::binary); + + LocalPlayer *player = m_env.getLocalPlayer(); + assert(player != NULL); + + player->eye_offset_first = readV3F1000(is); + player->eye_offset_third = readV3F1000(is); + } else { infostream<<"Client: Ignoring unknown command " -- cgit v1.2.3