diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-30 02:05:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-01 03:11:26 +0300 |
commit | a39f63cdfa5ce15b22f294a8bb1db3a036ce462d (patch) | |
tree | 4de71bde947cae0cf5d3196cd97e82f5bc537c5c /src/client.cpp | |
parent | 02ec4369acfbf261236631e20dbb76131e7889f8 (diff) | |
download | manaverse-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.gz manaverse-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.bz2 manaverse-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.xz manaverse-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.zip |
One part of fixes after auto checking.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client.cpp b/src/client.cpp index 62147874d..0024b16de 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -484,7 +484,7 @@ void Client::gameInit() icon = LoadIcon(GetModuleHandle(nullptr), "A"); if (icon) - SetClassLong(pInfo.window, GCL_HICON, (LONG) icon); + SetClassLong(pInfo.window, GCL_HICON, static_cast<LONG>(icon)); #else mIcon = IMG_Load(iconFile.c_str()); if (mIcon) @@ -2271,15 +2271,16 @@ bool Client::checkPackets(int type) if (!serverConfig.getValueBool("enableBuggyServers", true)) return true; - int timeLimit = instance()->mPacketLimits[type].timeLimit; + PacketLimit &limit = instance()->mPacketLimits[type]; + int timeLimit = limit.timeLimit; if (!timeLimit) return true; int time = tick_time; - int lastTime = instance()->mPacketLimits[type].lastTime; - int cnt = instance()->mPacketLimits[type].cnt; - int cntLimit = instance()->mPacketLimits[type].cntLimit; + int lastTime = limit.lastTime; + int cnt = limit.cnt; + int cntLimit = limit.cntLimit; if (lastTime > tick_time) { |