diff --git a/src/client/client.cpp b/src/client/client.cpp index 4961d721f6327..aa8bd1e8a86c4 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1016,7 +1016,7 @@ void Client::Send(NetworkPacket* pkt) m_con->Send(PEER_ID_SERVER, scf.channel, pkt, scf.reliable); } -// Will fill up 12 + 12 + 4 + 4 + 4 + 1 + 1 + 1 + 4 + 4 bytes +// Will fill up 12 + 12 + 4 + 4 + 4 + 1 + 1 + 1 + 4 + 4 + 4 + 4 bytes void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket *pkt, bool camera_inverted) { v3f pf = myplayer->getPosition() * 100; @@ -1048,6 +1048,8 @@ void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket * [12+12+4+4+4+1+1] u8 camera_inverted (bool) [12+12+4+4+4+1+1+1] f32 movement_speed [12+12+4+4+4+1+1+1+4] f32 movement_direction + [12+12+4+4+4+1+1+1+4+4] f32 point_pitch + [12+12+4+4+4+1+1+1+4+4+4] f32 point_yaw */ *pkt << position << speed << pitch << yaw << keyPressed; *pkt << fov << wanted_range; @@ -1418,7 +1420,7 @@ void Client::sendPlayerPos() player->last_point_pitch = player->point_pitch; player->last_point_yaw = player->point_yaw; - NetworkPacket pkt(TOSERVER_PLAYERPOS, 12 + 12 + 4 + 4 + 4 + 1 + 1 + 1 + 4 + 4); + NetworkPacket pkt(TOSERVER_PLAYERPOS, 12 + 12 + 4 + 4 + 4 + 1 + 1 + 1 + 4 + 4 + 4 + 4); writePlayerPos(player, &map, &pkt, camera_inverted); diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 0d63bd24f4933..b4017828de54c 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -727,6 +727,8 @@ enum ToServerCommand : u16 [2+12+12+4+4+4+1+1] u8 camera_inverted (bool) [2+12+12+4+4+4+1+1+1] f32 movement_speed [2+12+12+4+4+4+1+1+1+4] f32 movement_direction + [2+12+12+4+4+4+1+1+1+4+4] f32 point_pitch + [2+12+12+4+4+4+1+1+1+4+4+4] f32 point_yaw */