diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-02 18:57:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-02 18:57:10 +0300 |
commit | f1e92aca00a4859047e83fab76220767b9a2f814 (patch) | |
tree | 8aaa9d6853c6a8e0e8fc568c6f981cbd889b0cc3 /src/client.cpp | |
parent | 70b520b1e876f9698bb95baa2d274ea289a0c6bd (diff) | |
parent | 99771a1fb50286fdb0b511f425312503e657eddc (diff) | |
download | manaplus-f1e92aca00a4859047e83fab76220767b9a2f814.tar.gz manaplus-f1e92aca00a4859047e83fab76220767b9a2f814.tar.bz2 manaplus-f1e92aca00a4859047e83fab76220767b9a2f814.tar.xz manaplus-f1e92aca00a4859047e83fab76220767b9a2f814.zip |
Merge branch 'master' into strippedstripped1.1.10.2
Conflicts:
packaging/debian/watch
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index d0348dec5..8497d337b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2006,6 +2006,10 @@ void Client::initPacketLimiter() mPacketLimits[PACKET_ATTACK].cntLimit = 1; mPacketLimits[PACKET_ATTACK].cnt = 0; + mPacketLimits[PACKET_STOPATTACK].timeLimit = 2 + 10; + mPacketLimits[PACKET_STOPATTACK].lastTime = 0; + mPacketLimits[PACKET_STOPATTACK].cntLimit = 1; + mPacketLimits[PACKET_STOPATTACK].cnt = 0; if (!mServerConfigDir.empty()) { @@ -2043,7 +2047,7 @@ void Client::initPacketLimiter() mPacketLimits[f].timeLimit = atoi(line); } inPacketFile.close(); - if (ver == 1) + if (ver < 3) writePacketLimits(packetLimitsName); } } @@ -2058,7 +2062,7 @@ void Client::writePacketLimits(std::string packetLimitsName) outPacketFile.close(); return; } - outPacketFile << "2" << std::endl; + outPacketFile << "3" << std::endl; for (int f = 0; f < PACKET_SIZE; f ++) { outPacketFile << toString(mPacketLimits[f].timeLimit) |