From a1db9242ec491efdee70a7184aa61e861b17595a Mon Sep 17 00:00:00 2001 From: BlockMen Date: Wed, 8 Jan 2014 13:47:53 +0100 Subject: Add third person view --- src/client.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 56f55ef6c..4f392ad7a 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1914,6 +1914,20 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) event.override_day_night_ratio.ratio_f = day_night_ratio_f; m_client_event_queue.push_back(event); } + else if(command == TOCLIENT_LOCAL_PLAYER_ANIMATIONS) + { + 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->local_animations[0] = readV2F1000(is); + player->local_animations[1] = readV2F1000(is); + player->local_animations[2] = readV2F1000(is); + player->local_animations[3] = readV2F1000(is); + player->local_animation_speed = readF1000(is); + } else { infostream<<"Client: Ignoring unknown command " -- cgit v1.2.3