fix: reverted bot ping calculation to 2.9 era. affects #160
This commit is contained in:
parent
d2a4de7b09
commit
0f7f6011ae
1 changed files with 8 additions and 1 deletions
|
|
@ -596,9 +596,16 @@ void BotSupport::calculatePings () {
|
|||
}
|
||||
int part = static_cast <int> (average.first * 0.2f);
|
||||
|
||||
int botPing = bot->index () / 2 + bot->m_basePing + rg.int_ (average.first - part, average.first + part) + rg.int_ (bot->m_difficulty / 2, bot->m_difficulty);
|
||||
int botPing = bot->m_basePing + rg.int_ (average.first - part, average.first + part) + rg.int_ (bot->m_difficulty / 2, bot->m_difficulty);
|
||||
int botLoss = rg.int_ (average.second / 2, average.second);
|
||||
|
||||
if (botPing <= 5) {
|
||||
botPing = rg.int_ (10, 23);
|
||||
}
|
||||
else if (botPing > 70) {
|
||||
botPing = rg.int_ (30, 40);
|
||||
}
|
||||
|
||||
client.ping = getPingBitmask (client.ent, botLoss, botPing);
|
||||
client.pingUpdate = true; // force resend ping
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue