mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 20:43:26 +02:00
Partial support for protocol 1020 and minimize lag
I am able to login in global Tibia however there are game protocol errors * there is a new opcode 167, which I dont know what it is * there are changes in opcode 147 which handles text messages that I don't know too Connection writing was optimized, playing "lag" should improve by 10ms, and improve much more in systems with low fps
This commit is contained in:
@@ -147,6 +147,11 @@ void Application::poll()
|
||||
#endif
|
||||
|
||||
g_dispatcher.poll();
|
||||
|
||||
// poll connection again to flush pending write
|
||||
#ifdef FW_NET
|
||||
Connection::poll();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Application::exit()
|
||||
|
@@ -126,7 +126,7 @@ void Connection::write(uint8* buffer, size_t size)
|
||||
m_outputStream = std::shared_ptr<asio::streambuf>(new asio::streambuf);
|
||||
|
||||
m_delayedWriteTimer.cancel();
|
||||
m_delayedWriteTimer.expires_from_now(boost::posix_time::milliseconds(10));
|
||||
m_delayedWriteTimer.expires_from_now(boost::posix_time::milliseconds(0));
|
||||
m_delayedWriteTimer.async_wait(std::bind(&Connection::onCanWrite, asConnection(), std::placeholders::_1));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user