diff options
-rw-r--r-- | src/client.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp index 5d8978910..fd0672805 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1800,16 +1800,22 @@ void Client::slowLogic() if (get_elapsed_time1(mPing) > 1500) { mPing = tick_time; - if (mState != STATE_UPDATE && - mState != STATE_LOGIN && - mState != STATE_LOGIN_ATTEMPT) + if (mState == STATE_UPDATE || + mState == STATE_LOGIN || + mState == STATE_LOGIN_ATTEMPT) { - return; + if (loginHandler) + loginHandler->ping(); + if (generalHandler) + generalHandler->flushSend(); + } + else if (mState == STATE_CHAR_SELECT) + { + if (charServerHandler) + charServerHandler->ping(); + if (generalHandler) + generalHandler->flushSend(); } - if (loginHandler) - loginHandler->ping(); - if (generalHandler) - generalHandler->flushSend(); } } |