1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add third person view

This commit is contained in:
BlockMen 2014-01-08 13:47:53 +01:00
parent e149d1ad9a
commit a1db9242ec
19 changed files with 270 additions and 22 deletions

View file

@ -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 "