bot: add basic support to play as zombie bot

aim: check that we're actually hit the target in body checks
This commit is contained in:
jeefo 2023-05-08 00:44:14 +03:00
commit 3009b4f50a
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
8 changed files with 101 additions and 26 deletions

View file

@ -740,6 +740,15 @@ void BotManager::setLastWinner (int winner) {
}
}
void BotManager::checkBotModel (edict_t *ent, char *infobuffer) {
for (const auto &bot : bots) {
if (bot->ent () == ent) {
bot->refreshModelName (infobuffer);
break;
}
}
}
void BotManager::setWeaponMode (int selection) {
// this function sets bots weapon mode
@ -1367,6 +1376,7 @@ void Bot::newRound () {
for (auto &timer : m_chatterTimes) {
timer = kMaxChatterRepeatInterval;
}
refreshModelName (nullptr);
m_isReloading = false;
m_reloadState = Reload::None;