mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-25 21:40:09 +00:00
fixed ghost player issue
This commit is contained in:
1 parent
b81ac35b37
commit
f13523fbe5
2 files changed
-2
No files matched your search
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user