fix: bot kick menu isn't functional

nav: probably fix for ladder climbing (ref #544 ref #319)
bot: implemented [RSE] Neoptolemus's fix for msec calculation (round vs int cast)
This commit is contained in:
jeefo 2024-03-27 23:21:00 +03:00
commit df9bc66023
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
6 changed files with 52 additions and 23 deletions

View file

@ -2060,8 +2060,8 @@ void BotControl::kickBotByMenu (int page) {
for (int i = menuKey; i < page * 8; ++i) {
auto bot = bots[i];
// check for fakeclient bit, since we're clear it upon kick, but actual bot struct destroyed after client disconnected
if (bot != nullptr && (bot->pev->flags & FL_FAKECLIENT)) {
// check for dormant bit, since we're adds it upon kick, but actual bot struct destroyed after client disconnected
if (bot != nullptr && !(bot->pev->flags & FL_DORMANT)) {
menuKeys |= cr::bit (cr::abs (i - menuKey));
menus.appendf ("%1.1d. %s%s\n", i - menuKey + 1, bot->pev->netname.chars (), bot->m_team == Team::CT ? " \\y(CT)\\w" : " \\r(T)\\w");
}