summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authormathiascode <8754153+mathiascode@users.noreply.github.com>2018-04-03 15:39:39 +0200
committerAlexander Harkness <me@bearbin.net>2018-04-03 15:39:39 +0200
commitf4a1ebd88000b62706aaa08fc21db5d0e65354f6 (patch)
treef421185a9dd4301cb9470b7783efa40f48ebdbe7 /src/ClientHandle.cpp
parent* Block Info: glazed terracotta and concrete hardness/solid voxel status (#4205) (diff)
downloadcuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.tar
cuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.tar.gz
cuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.tar.bz2
cuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.tar.lz
cuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.tar.xz
cuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.tar.zst
cuberite-f4a1ebd88000b62706aaa08fc21db5d0e65354f6.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp14
1 files changed, 7 insertions, 7 deletions
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)
{