Skip to content

Commit 058b922

Browse files
committed
1 parent abb81ba commit 058b922

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

src/game/shared/tf/tf_gamerules.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,11 @@ bool CTFGameRules::GameModeUsesUpgrades( void )
21992199
if ( m_nForceUpgrades == 1 )
22002200
return false;
22012201

2202+
#ifdef BDSBASE
2203+
if (m_nForceUpgrades == 2 || m_nForceUpgrades == 3)
2204+
#else
22022205
if ( m_nForceUpgrades == 2 )
2206+
#endif
22032207
return true;
22042208

22052209
if ( IsMannVsMachineMode() || IsBountyMode() )
@@ -3810,6 +3814,14 @@ bool CTFGameRules::CanInitiateDuels( void )
38103814
return true;
38113815
}
38123816

3817+
#ifdef BDSBASE
3818+
//-----------------------------------------------------------------------------
3819+
bool CTFGameRules::ShouldProvidePowerupBottle(void)
3820+
{
3821+
return GameModeUsesUpgrades() && m_nForceUpgrades != 3;
3822+
}
3823+
#endif
3824+
38133825
//-----------------------------------------------------------------------------
38143826
// Purpose:
38153827
//-----------------------------------------------------------------------------

src/game/shared/tf/tf_gamerules.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ bool IsCreepWaveMode( void ) const;
743743

744744
bool IsUsingSpells( void ) const;
745745
bool IsUsingGrapplingHook( void ) const;
746+
#ifdef BDSBASE
747+
bool ShouldProvidePowerupBottle(void);
748+
#endif
746749

747750
bool IsTruceActive( void ) const;
748751

src/game/shared/tf/tf_item_inventory.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,11 @@ bool CTFInventoryManager::SlotContainsBaseItems( EEquipType_t eType, int iSlot )
745745

746746
if ( TFGameRules() && TFGameRules()->IsUsingGrapplingHook() )
747747
return true;
748+
749+
#ifdef BDSBASE
750+
if (TFGameRules() && TFGameRules()->ShouldProvidePowerupBottle())
751+
return true;
752+
#endif
748753
}
749754
// Normal game
750755
return iSlot < LOADOUT_POSITION_HEAD;
@@ -786,7 +791,11 @@ CEconItemView *CTFInventoryManager::GetBaseItemForClass( int iClass, int iSlot )
786791
}
787792

788793
static CSchemaItemDefHandle pItemDef_MvMCanteen( "Default Power Up Canteen (MvM)" );
794+
#ifdef BDSBASE
795+
if (TFGameRules() && TFGameRules()->ShouldProvidePowerupBottle() && pItemDef_MvMCanteen)
796+
#else
789797
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && pItemDef_MvMCanteen )
798+
#endif
790799
{
791800
stockActionItemDefIndices.AddToTail( pItemDef_MvMCanteen->GetDefinitionIndex() );
792801
}

0 commit comments

Comments
 (0)