mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add player:set_eye_offset() by @MirceaKitsune and clean up
This commit is contained in:
parent
a1db9242ec
commit
c0ab09af74
16 changed files with 108 additions and 13 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue