1
0

Properly destroy player (#4199)

This commit is contained in:
mathiascode 2018-04-03 16:39:39 +03:00 committed by Alexander Harkness
parent 7833e8112f
commit f4a1ebd880

View File

@ -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)
{