diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-22 13:40:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-22 13:40:46 +0300 |
commit | a45e11159f7df1a80d75e2a6defb559ebc375e4b (patch) | |
tree | d4894943a8b8da15624bcc59c650046fc7ba340b /src/client.cpp | |
parent | 95fdd4dab7a079eb67e98a02a8752631ce05dcab (diff) | |
download | plus-a45e11159f7df1a80d75e2a6defb559ebc375e4b.tar.gz plus-a45e11159f7df1a80d75e2a6defb559ebc375e4b.tar.bz2 plus-a45e11159f7df1a80d75e2a6defb559ebc375e4b.tar.xz plus-a45e11159f7df1a80d75e2a6defb559ebc375e4b.zip |
Send char server ping packets if server support it.
Diffstat (limited to 'src/client.cpp')
-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(); } } |