Properly destroy player (#4199)
This commit is contained in:
parent
7833e8112f
commit
f4a1ebd880
@ -2048,13 +2048,6 @@ void cClientHandle::Tick(float a_Dt)
|
|||||||
|
|
||||||
ProcessProtocolInOut();
|
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 player has been kicked, terminate the connection:
|
||||||
if (m_State == csKicked)
|
if (m_State == csKicked)
|
||||||
{
|
{
|
||||||
@ -2071,6 +2064,13 @@ void cClientHandle::Tick(float a_Dt)
|
|||||||
return;
|
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:
|
// Only process further if the player object is valid:
|
||||||
if (m_Player == nullptr)
|
if (m_Player == nullptr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user