nav: reworked bot dropping on pathfinder failure
This commit is contained in:
parent
259dd18330
commit
375a64b861
5 changed files with 19 additions and 12 deletions
|
|
@ -816,6 +816,15 @@ void BotManager::checkBotModel (edict_t *ent, char *infobuffer) {
|
|||
}
|
||||
}
|
||||
|
||||
void BotManager::checkNeedsToBeKicked () {
|
||||
for (const auto &bot : bots) {
|
||||
if (bot->m_kickMeFromServer) {
|
||||
bot->kick (); // kick bot from server if requested
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BotManager::setWeaponMode (int selection) {
|
||||
// this function sets bots weapon mode
|
||||
|
||||
|
|
@ -1659,7 +1668,7 @@ void Bot::kick (bool silent) {
|
|||
// this function kick off one bot from the server.
|
||||
auto username = pev->netname.chars ();
|
||||
|
||||
if (!(pev->flags & FL_CLIENT) || strings.isEmpty (username)) {
|
||||
if (!(pev->flags & FL_CLIENT) || (pev->flags & FL_DORMANT) || strings.isEmpty (username)) {
|
||||
return;
|
||||
}
|
||||
markStale ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue