From 5b636909868d77882d216c2467b0b66e00239fb0 Mon Sep 17 00:00:00 2001 From: jeefo Date: Wed, 22 May 2024 19:57:02 +0300 Subject: [PATCH] bot: reduce items ignorance after donating bomb refactor: fix some typos --- src/botlib.cpp | 13 ++++++------- src/engine.cpp | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/botlib.cpp b/src/botlib.cpp index 1be699d..8594cbb 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -4140,9 +4140,8 @@ bool Bot::isCreature () { return m_isOnInfectedTeam || m_modelMask == kModelMaskZombie || m_modelMask == kModelMaskChicken; } - void Bot::donateC4ToHuman () { - edict_t *recepient = nullptr; + edict_t *recipient = nullptr; if (!m_hasC4) { return; @@ -4155,15 +4154,15 @@ void Bot::donateC4ToHuman () { } if (client.origin.distanceSq (pev->origin) < radiusSq) { - recepient = client.ent; + recipient = client.ent; break; } } - if (game.isNullEntity (recepient)) { + if (game.isNullEntity (recipient)) { return; } - m_itemCheckTime = game.time () + 2.0f; + m_itemCheckTime = game.time () + 1.0f; // select the bomb if (m_currentWeapon != Weapon::C4) { @@ -4190,8 +4189,8 @@ void Bot::donateC4ToHuman () { if (!game.isNullEntity (bomb)) { bomb->v.flags |= FL_ONGROUND; - // make recepient frient "pickup" it - MDLL_Touch (bomb, recepient); + // make recipient friend "pickup" ищьи + MDLL_Touch (bomb, recipient); } } diff --git a/src/engine.cpp b/src/engine.cpp index 155460c..c95e46b 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -90,7 +90,7 @@ void Game::levelInitialize (edict_t *entities, int max) { // set the global timer function timerStorage.setTimeAddress (&globals->time); - // reset timer + // restart the fakeping timer, so it'll start working after mapchange fakeping.restartTimer (); // go thru the all entities on map, and do whatever we're want