X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fserver%2Fnet.cpp;h=38224ec9a57e879e2a84357a77456b30253f3f1c;hb=150d065f431d665326fd8028748c48a74ad956bb;hp=b681eec3f74c5d1f3ea576c48d9a2e7138073c7e;hpb=7c5e04a4af82947ae8e26db3d03f13a555c10aba;p=blank.git diff --git a/src/server/net.cpp b/src/server/net.cpp index b681eec..38224ec 100644 --- a/src/server/net.cpp +++ b/src/server/net.cpp @@ -247,7 +247,6 @@ void ClientConnection::Update(int dt) { } SendUpdates(); - input->Update(dt); CheckPlayerFix(); CheckChunkQueue(); } @@ -550,21 +549,17 @@ void ClientConnection::On(const Packet::PlayerUpdate &pack) { return; } glm::vec3 movement(0.0f); - float pitch = 0.0f; - float yaw = 0.0f; uint8_t new_actions; uint8_t slot; player_update_pack = pack.Seq(); pack.ReadPredictedState(player_update_state); pack.ReadMovement(movement); - pack.ReadPitch(pitch); - pack.ReadYaw(yaw); pack.ReadActions(new_actions); pack.ReadSlot(slot); input->SetMovement(movement); - input->TurnHead(pitch - input->GetPitch(), yaw - input->GetYaw()); + input->TurnHead(player_update_state.pitch - input->GetPitch(), player_update_state.yaw - input->GetYaw()); input->SelectInventory(slot); if ((new_actions & 0x01) && !(old_actions & 0x01)) {