// // read_input // void ClientSidePrediction::read_input(Connection* connection, MemoryBuffer& message) { auto network = GetSubsystem<Network>(); if (!connection->IsClient()) { LOGWARNING("Received unexpected Controls message from server"); return; } Controls newControls; newControls.buttons_ = message.ReadUInt(); newControls.yaw_ = message.ReadFloat(); newControls.pitch_ = message.ReadFloat(); newControls.extraData_ = message.ReadVariantMap(); client_input_IDs[connection] = newControls.extraData_["id"].GetUInt(); apply_client_input(newControls, timestep, connection); // No access, and currently no use //// Client may or may not send observer position & rotation for interest management //if (!msg.IsEof()) // position_ = msg.ReadVector3(); //if (!msg.IsEof()) // rotation_ = msg.ReadPackedQuaternion(); }