summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorBlockMen <nmuelll@web.de>2014-04-11 15:32:46 +0200
committerBlockMen <nmuelll@web.de>2014-04-12 17:44:20 +0200
commitc0ab09af747fc431dfb459ede30788cb9cd1c56b (patch)
tree7355b0b349a6d188e6066c00c3b3ef9b0a76f33e /src/client.cpp
parenta1db9242ec491efdee70a7184aa61e861b17595a (diff)
downloadminetest-c0ab09af747fc431dfb459ede30788cb9cd1c56b.tar.gz
minetest-c0ab09af747fc431dfb459ede30788cb9cd1c56b.tar.bz2
minetest-c0ab09af747fc431dfb459ede30788cb9cd1c56b.zip
Add player:set_eye_offset() by @MirceaKitsune and clean up
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp11
1 files changed, 11 insertions, 0 deletions
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 "