From 34ad4724f26dadefe6ff10ed5121b5786675c8b3 Mon Sep 17 00:00:00 2001 From: Marc-Eric Martel Date: Tue, 28 Nov 2023 19:19:24 -0500 Subject: [PATCH] Tibug + Linux --- SQCSim-common/define.h | 1 + SQCSim-srv/connection.cpp | 6 +++--- SQCSim-srv/server.cpp | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SQCSim-common/define.h b/SQCSim-common/define.h index 17db0ad..b018971 100644 --- a/SQCSim-common/define.h +++ b/SQCSim-common/define.h @@ -76,6 +76,7 @@ typedef uint64_t Timestamp; #include #include #include +#include #define flag_t unsigned int #define addrlen_t unsigned int diff --git a/SQCSim-srv/connection.cpp b/SQCSim-srv/connection.cpp index c1092c9..ac01b5f 100644 --- a/SQCSim-srv/connection.cpp +++ b/SQCSim-srv/connection.cpp @@ -145,8 +145,8 @@ void Connection::Run(World* world) { } void Connection::CleanInputManifest(Timestamp time) { - auto wat = m_input_manifest.find(time); +// auto wat = m_input_manifest.find(time); - while (wat != m_input_manifest.begin()) - m_input_manifest.erase(wat--); +// while (wat != m_input_manifest.begin()) +// m_input_manifest.erase(wat--); } diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index db0784d..d4773bf 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -208,10 +208,9 @@ void Server::Run() { sync.timer = m_game.countdown; sendPackTo(m_sock_udp, &sync, &m_buf, conn->getAddr()); - int timer = m_game.countdown, sync_acc; + int timer = m_game.countdown, sync_acc = 0; std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now(); Timestamp last = 0; - int sync_acc = 0; while (!endgame) { using namespace std::chrono;