summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-30 02:05:40 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-01 03:11:26 +0300
commita39f63cdfa5ce15b22f294a8bb1db3a036ce462d (patch)
tree4de71bde947cae0cf5d3196cd97e82f5bc537c5c /src/client.cpp
parent02ec4369acfbf261236631e20dbb76131e7889f8 (diff)
downloadplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.gz
plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.bz2
plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.xz
plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.zip
One part of fixes after auto checking.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp11
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)
{