1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-02 07:35:08 +02:00

account for unclamped yaw value

This commit is contained in:
p2r3
2025-08-13 18:27:08 +03:00
parent 5769a8552b
commit 864ec760ea

2
main.c
View File

@@ -170,7 +170,7 @@ void handlePacket (int client_fd, int length, int packet_id) {
player->y = cy;
player->z = cz;
if (packet_id == 0x1E) {
player->yaw = (short)yaw % 180 * 127 / 180;
player->yaw = ((short)(yaw + 540) % 360 - 180) * 127 / 180;
player->pitch = pitch / 90.0f * 127.0f;
}