Core/PacketIO: Allow to queue up to 3 time sync requests to prevent very long loading screns from printing cheater warnings
Closes #10063
This commit is contained in:
1 parent
de64f5d34f
commit
365ac79100
3 files changed
+8
-5
No files matched your search
@@ -26481,7 +26481,6 @@ void Player::ActivateSpec(uint8 spec)
|
||||
|
||||
void Player::ResetTimeSync()
|
||||
{
|
||||
m_timeSyncCounter = 0;
|
||||
m_timeSyncTimer = 0;
|
||||
m_timeSyncClient = 0;
|
||||
m_timeSyncServer = getMSTime();
|
||||
@@ -26489,15 +26488,18 @@ void Player::ResetTimeSync()
|
||||
|
||||
void Player::SendTimeSync()
|
||||
{
|
||||
m_timeSyncCounter = m_movementCounter;
|
||||
m_timeSyncQueue.push(m_movementCounter++);
|
||||
|
||||
WorldPacket data(SMSG_TIME_SYNC_REQ, 4);
|
||||
data << uint32(m_movementCounter++);
|
||||
data << uint32(m_timeSyncQueue.back());
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
// Schedule next sync in 10 sec
|
||||
m_timeSyncTimer = 10000;
|
||||
m_timeSyncServer = getMSTime();
|
||||
|
||||
if (m_timeSyncQueue.size() > 3)
|
||||
TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Not received CMSG_TIME_SYNC_RESP for over 30 seconds from player %u (%s), possible cheater", GetGUIDLow(), GetName().c_str());
|
||||
}
|
||||
|
||||
void Player::SetReputation(uint32 factionentry, uint32 value)
|
||||
|
||||
Reference in new issue
Block a user