From 2d339a8c6c52224a6bde5687e4ad873c1bce5b1b Mon Sep 17 00:00:00 2001 From: nekiro Date: Sat, 27 Nov 2021 13:21:33 +0100 Subject: [PATCH 1/2] Reset idle time on reconnect --- src/protocolgame.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp index 3db0b0b436..96e228f4c0 100644 --- a/src/protocolgame.cpp +++ b/src/protocolgame.cpp @@ -282,6 +282,7 @@ void ProtocolGame::connect(uint32_t playerId, OperatingSystem_t operatingSystem) sendAddCreature(player, player->getPosition(), 0, false); player->lastIP = player->getIP(); player->lastLoginSaved = std::max(time(nullptr), player->lastLoginSaved + 1); + player->resetIdleTime() acceptPackets = true; } From f7f6949eb443e80f612075f3d034c8f149140d30 Mon Sep 17 00:00:00 2001 From: nekiro Date: Sat, 27 Nov 2021 14:05:12 +0100 Subject: [PATCH 2/2] Update protocolgame.cpp --- src/protocolgame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp index 96e228f4c0..7ee6504afe 100644 --- a/src/protocolgame.cpp +++ b/src/protocolgame.cpp @@ -282,7 +282,7 @@ void ProtocolGame::connect(uint32_t playerId, OperatingSystem_t operatingSystem) sendAddCreature(player, player->getPosition(), 0, false); player->lastIP = player->getIP(); player->lastLoginSaved = std::max(time(nullptr), player->lastLoginSaved + 1); - player->resetIdleTime() + player->resetIdleTime(); acceptPackets = true; }