Merge branch 'Networking' of github.com:teamfisk/TacticalZ into Networking

# Conflicts:
#	src/Engine/Network/Client.cpp
#	src/Engine/Network/Server.cpp
This commit is contained in:
Jocke
2016-01-20 16:30:12 +01:00
5 changed files with 31 additions and 16 deletions
+1 -2
View File
@@ -181,7 +181,6 @@ void Server::sendPing()
void Server::checkForTimeOuts()
{
int timeOutTimeMs = 5000;
int startPing = 1000 * m_StartPingTime
/ static_cast<double>(CLOCKS_PER_SEC);
@@ -189,7 +188,7 @@ void Server::checkForTimeOuts()
if (m_ConnectedUsers[i].Endpoint.address() != boost::asio::ip::address()) {
int stopPing = 1000 * m_ConnectedUsers[i].StopTime /
static_cast<double>(CLOCKS_PER_SEC);
if (startPing > stopPing + timeOutTimeMs) {
if (startPing > stopPing + TIMEOUTMS) {
LOG_INFO("User %i timed out!", i);
disconnect(i);
}