summaryrefslogtreecommitdiff
path: root/src/net/eathena/network.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-15 00:25:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-15 00:25:28 +0300
commitfcd38e8269205f062e27ea42d5107e5700023ff3 (patch)
treee432e583e695ee7e6ad4f386c7884175a568c141 /src/net/eathena/network.cpp
parent64af13a976cbe5cf2d050d3d576f1d008c5a7708 (diff)
downloadmv-fcd38e8269205f062e27ea42d5107e5700023ff3.tar.gz
mv-fcd38e8269205f062e27ea42d5107e5700023ff3.tar.bz2
mv-fcd38e8269205f062e27ea42d5107e5700023ff3.tar.xz
mv-fcd38e8269205f062e27ea42d5107e5700023ff3.zip
eathena: remove some tmw/evol related packets.
Diffstat (limited to 'src/net/eathena/network.cpp')
-rw-r--r--src/net/eathena/network.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index 96675002d..78ff3377e 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -98,15 +98,8 @@ void Network::dispatchMessages()
SDL_mutexP(mMutexIn);
const unsigned int msgId = readWord(0);
int len = -1;
- if (msgId == SMSG_UPDATE_HOST2)
- {
- len = -1;
- }
- else
- {
- if (msgId < packet_lengths_size)
- len = packet_lengths[msgId];
- }
+ if (msgId < packet_lengths_size)
+ len = packet_lengths[msgId];
if (len == -1)
len = readWord(2);
@@ -147,17 +140,10 @@ bool Network::messageReady()
if (mInSize >= 2)
{
const int msgId = readWord(0);
- if (msgId == SMSG_UPDATE_HOST2)
- {
- len = -1;
- }
- else
+ if (msgId >= 0 && static_cast<unsigned int>(msgId)
+ < packet_lengths_size)
{
- if (msgId >= 0 && static_cast<unsigned int>(msgId)
- < packet_lengths_size)
- {
- len = packet_lengths[msgId];
- }
+ len = packet_lengths[msgId];
}
if (len == -1 && mInSize > 4)