Skip to content

Commit d9aa13d

Browse files
committed
fix bots
1 parent 88b3968 commit d9aa13d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/game/shared/tf/tf_weapon_lunchbox.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ void CTFLunchBox::ApplyBiteEffects( CTFPlayer *pPlayer )
432432
iHeal = iHeal * flHealScale;
433433

434434
int iHealed = pPlayer->TakeHealth(iHeal, iHealType);
435-
if (iHealed > 0)
435+
// for bots, remove the sandvich to prevent it being eaten multiple times.
436+
if (iHealed > 0 && !pPlayer->IsBot())
436437
{
437438
CTF_GameStats.Event_PlayerHealedOther(pPlayer, iHealed);
438439
bDrainAmmo = true;

0 commit comments

Comments
 (0)