mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
attempt to fix ghost player issue
This commit is contained in:
committed by
Anonymous275
parent
13f8be5d39
commit
e04a569e33
@@ -70,3 +70,12 @@ TServer& TClient::Server() const {
|
||||
TClient::TClient(TServer& Server)
|
||||
: mServer(Server) {
|
||||
}
|
||||
|
||||
void TClient::UpdatePingTime() {
|
||||
mLastPingTime = std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
int TClient::SecondsSinceLastPing() {
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(
|
||||
std::chrono::high_resolution_clock::now() - mLastPingTime)
|
||||
.count();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user