diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 3afd4cc83..e28391fca 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -2048,13 +2048,6 @@ void cClientHandle::Tick(float a_Dt) ProcessProtocolInOut(); - m_TicksSinceLastPacket += 1; - if (m_TicksSinceLastPacket > 600) // 30 seconds time-out - { - SendDisconnect("Nooooo!! You timed out! D: Come back!"); - return; - } - // If player has been kicked, terminate the connection: if (m_State == csKicked) { @@ -2071,6 +2064,13 @@ void cClientHandle::Tick(float a_Dt) return; } + m_TicksSinceLastPacket += 1; + if (m_TicksSinceLastPacket > 600) // 30 seconds time-out + { + SendDisconnect("Nooooo!! You timed out! D: Come back!"); + return; + } + // Only process further if the player object is valid: if (m_Player == nullptr) {