feat: enhance packet handling in OverteClient by parsing entity server packets
This commit is contained in:
@@ -142,11 +142,12 @@ void OverteClient::poll() {
|
|||||||
sockaddr_storage from{}; socklen_t fromlen = sizeof(from);
|
sockaddr_storage from{}; socklen_t fromlen = sizeof(from);
|
||||||
ssize_t r = ::recvfrom(m_udpFd, buf, sizeof(buf), 0, reinterpret_cast<sockaddr*>(&from), &fromlen);
|
ssize_t r = ::recvfrom(m_udpFd, buf, sizeof(buf), 0, reinterpret_cast<sockaddr*>(&from), &fromlen);
|
||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
// TODO: feed avatar/audio packets through protocol parser
|
// Parse as potential domain/avatar packets
|
||||||
// std::cout << "[OverteClient] UDP packet received (" << r << " bytes)" << std::endl;
|
parseEntityPacket(buf, static_cast<size_t>(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parse entity server packets
|
||||||
parseNetworkPackets();
|
parseNetworkPackets();
|
||||||
|
|
||||||
if (m_useSimulation) {
|
if (m_useSimulation) {
|
||||||
|
|||||||
Reference in New Issue
Block a user