SQC-15_online #1
@@ -76,6 +76,7 @@ typedef uint64_t Timestamp;
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <poll.h>
|
||||||
|
|
||||||
#define flag_t unsigned int
|
#define flag_t unsigned int
|
||||||
#define addrlen_t unsigned int
|
#define addrlen_t unsigned int
|
||||||
|
@@ -145,8 +145,8 @@ void Connection::Run(World* world) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Connection::CleanInputManifest(Timestamp time) {
|
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())
|
// while (wat != m_input_manifest.begin())
|
||||||
m_input_manifest.erase(wat--);
|
// m_input_manifest.erase(wat--);
|
||||||
}
|
}
|
||||||
|
@@ -208,10 +208,9 @@ void Server::Run() {
|
|||||||
sync.timer = m_game.countdown;
|
sync.timer = m_game.countdown;
|
||||||
sendPackTo<Sync>(m_sock_udp, &sync, &m_buf, conn->getAddr());
|
sendPackTo<Sync>(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();
|
std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now();
|
||||||
Timestamp last = 0;
|
Timestamp last = 0;
|
||||||
int sync_acc = 0;
|
|
||||||
|
|
||||||
while (!endgame) {
|
while (!endgame) {
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
|
Reference in New Issue
Block a user