Skip to content

Commit 7524bdd

Browse files
committed
NOOOOOOOOOO MOOOOOOOOOOOOOOOOOORRRRREEEE!!
1 parent 01955aa commit 7524bdd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/game/server/tf/bot/tf_bot.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5064,14 +5064,15 @@ Action< CTFBot > *CTFBot::OpportunisticallyUseWeaponAbilities( void )
50645064
{
50655065
// if we have an eatable (drink, sandvich, etc) - eat it!
50665066
CTFLunchBox *lunchbox = (CTFLunchBox *)weapon;
5067-
#ifdef BDSBASE
5068-
if ( lunchbox->HasAmmo() && GetHealth() < GetMaxHealth() )
5069-
#else
50705067
if ( lunchbox->HasAmmo() )
5071-
#endif
50725068
{
50735069
// scout lunchboxes are also gated by their energy drink meter
5070+
#ifdef BDSBASE
5071+
CTFLunchBox_Drink* lunchboxDrink = (CTFLunchBox_Drink*)lunchbox;
5072+
if ( ( !IsPlayerClass( TF_CLASS_SCOUT ) && GetHealth() < GetMaxHealth() ) || ( lunchboxDrink && m_Shared.GetScoutEnergyDrinkMeter() >= 100 ) )
5073+
#else
50745074
if ( !IsPlayerClass( TF_CLASS_SCOUT ) || m_Shared.GetScoutEnergyDrinkMeter() >= 100 )
5075+
#endif
50755076
{
50765077
return new CTFBotUseItem( lunchbox );
50775078
}

0 commit comments

Comments
 (0)