File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments