update internal ping every second while syncing

This commit is contained in:
Lion Kortlepel 2021-02-17 13:16:03 +01:00 committed by Anonymous275
parent 8664522d1d
commit b81ac35b37

View File

@ -37,8 +37,10 @@ void TPPSMonitor::operator()() {
V += c->GetCarCount(); V += c->GetCarCount();
} }
// kick on "no ping" // kick on "no ping"
if (c->SecondsSinceLastPing() > 10) { if (c->SecondsSinceLastPing() > 10 && c->IsSynced()) {
TimedOutClients.push_back(c); TimedOutClients.push_back(c);
} else if (!c->IsSynced()) {
c->UpdatePingTime();
} }
} }
return true; return true;