mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Add player:set_eye_offset() by @MirceaKitsune and clean up
This commit is contained in:
@@ -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 "
|
||||
|
Reference in New Issue
Block a user