diff options
-rw-r--r-- | src/client.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 37 |
2 files changed, 13 insertions, 26 deletions
diff --git a/src/client.cpp b/src/client.cpp index 14f9a784c..f433746e0 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1078,8 +1078,6 @@ int Client::gameExec() case STATE_PRE_LOGIN: logger->log1("State: PRE_LOGIN"); -// if (serverVersion < 5) -// setState(STATE_LOGIN); break; case STATE_LOGIN: diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index ec0bd3d54..e7b5deb6c 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -273,38 +273,27 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) const char *buf = start; - int addVal = 1; - if (serverVersion >= 4) - addVal = 3; + int addVal = 3; while (buf - start + 1 < size && *(buf + static_cast<size_t>(addVal))) { - unsigned char status = 255; - unsigned char ver = 0; - unsigned char level = 0; - if (serverVersion >= 4) - { - status = *buf; - buf ++; - level = *buf; - buf ++; - ver = *buf; - } + unsigned char status = *buf; + buf ++; + unsigned char level = *buf; + buf ++; + unsigned char ver = *buf; buf ++; unsigned char gender = Gender::UNSPECIFIED; - if (serverVersion >= 4) + if (config.getBoolValue("showgender")) { - if (config.getBoolValue("showgender")) - { - if (status & BeingFlag::GENDER_MALE) - gender = Gender::MALE; - else if (status & BeingFlag::GENDER_OTHER) - gender = Gender::OTHER; - else - gender = Gender::FEMALE; - } + if (status & BeingFlag::GENDER_MALE) + gender = Gender::MALE; + else if (status & BeingFlag::GENDER_OTHER) + gender = Gender::OTHER; + else + gender = Gender::FEMALE; } arr.push_back(new OnlinePlayer(static_cast<const char*>(buf), status, level, gender, ver)); |