Skip to content

Commit

Permalink
bot: reduce items ignorance after donating bomb
Browse files Browse the repository at this point in the history
refactor: fix some typos
  • Loading branch information
jeefo committed May 22, 2024
1 parent eb5dd11 commit 5b63690
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/botlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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" ищьи

This comment has been minimized.

Copy link
@snaike00

snaike00 May 22, 2024

Было:
// make recepient frient "pickup" it
Стало:
// make recipient friend "pickup" ищьи
Я понимаю что это коммент, но все же ))

This comment has been minimized.

Copy link
@jeefo

jeefo May 22, 2024

Author Collaborator

пасиб)

MDLL_Touch (bomb, recipient);
}
}

2 changes: 1 addition & 1 deletion src/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b63690

Please sign in to comment.