fixed ghost player issue

This commit is contained in:
Lion Kortlepel 2021-02-17 13:18:30 +01:00 committed by Anonymous275
parent b81ac35b37
commit f13523fbe5
2 changed files with 0 additions and 2 deletions

View File

@ -79,6 +79,5 @@ int TClient::SecondsSinceLastPing() {
auto seconds = std::chrono::duration_cast<std::chrono::seconds>( auto seconds = std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::high_resolution_clock::now() - mLastPingTime) std::chrono::high_resolution_clock::now() - mLastPingTime)
.count(); .count();
debug("ping time for " + GetName() + ": " + std::to_string(seconds));
return seconds; return seconds;
} }

View File

@ -95,7 +95,6 @@ void TServer::GlobalParser(std::weak_ptr<TClient> Client, std::string Packet, TP
TCPServer.Respond(*LockedClient, ("p"), false); TCPServer.Respond(*LockedClient, ("p"), false);
TCPServer.UpdatePlayer(*LockedClient); TCPServer.UpdatePlayer(*LockedClient);
LockedClient->UpdatePingTime(); LockedClient->UpdatePingTime();
debug("ping received from " + LockedClient->GetName());
return; return;
case 'O': case 'O':
if (Packet.length() > 1000) { if (Packet.length() > 1000) {