From eb8053e6078535df0eadb1529f30844cea52cc62 Mon Sep 17 00:00:00 2001 From: isplatonov Date: Thu, 11 Jan 2024 17:34:56 +0100 Subject: [PATCH] ping problem possible solution --- src/common/Multiplayer/Operators.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/Multiplayer/Operators.cpp b/src/common/Multiplayer/Operators.cpp index d8c8e12..d2c8126 100644 --- a/src/common/Multiplayer/Operators.cpp +++ b/src/common/Multiplayer/Operators.cpp @@ -64,6 +64,7 @@ sf::Packet& operator >>(sf::Packet& packet, Multiplayer::PlayerData& player_data unsigned int msg_port; PlayerId player_id; packet >> position.x >> position.y >> player_id >> sent_time; + sent_time = static_cast(std::chrono::duration_cast(std::chrono::high_resolution_clock::now().time_since_epoch()).count()); sf::Uint32 inventory_size_uint32; packet >> inventory_size_uint32; size_t inventory_size = static_cast(inventory_size_uint32);