Skip to content

Commit db1cb09

Browse files
committed
1 parent 60d648a commit db1cb09

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/game/server/tf/tf_player.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ ConVar tf_halloween_allow_ghost_hit_by_kart_delay( "tf_halloween_allow_ghost_hit
291291
ConVar tf_maxhealth_drain_hp_min( "tf_maxhealth_drain_hp_min", "100", FCVAR_DEVELOPMENTONLY );
292292
ConVar tf_maxhealth_drain_deploy_cost( "tf_maxhealth_drain_deploy_cost", "20", FCVAR_DEVELOPMENTONLY );
293293

294+
#ifdef BDSBASE
295+
ConVar tf_itemtest_players_take_damage("tf_itemtest_players_take_damage", "0", FCVAR_CHEAT, "If non-zero players will be able to take damage in itemtest");
296+
#endif
297+
294298
extern ConVar sv_vote_allow_spectators;
295299
ConVar sv_vote_late_join_time( "sv_vote_late_join_time", "90", FCVAR_NONE, "Grace period after the match starts before players who join the match receive a vote-creation cooldown" );
296300
ConVar sv_vote_late_join_cooldown( "sv_vote_late_join_cooldown", "300", FCVAR_NONE, "Length of the vote-creation cooldown when joining the server after the grace period has expired" );
@@ -11600,7 +11604,11 @@ void CTFPlayer::PlayDamageResistSound( float flStartDamage, float flModifiedDama
1160011604
//-----------------------------------------------------------------------------
1160111605
int CTFPlayer::OnTakeDamage_Alive( const CTakeDamageInfo &info )
1160211606
{
11607+
#ifdef BDSBASE
11608+
if ( TFGameRules()->IsInItemTestingMode() && !IsFakeClient() && !tf_itemtest_players_take_damage.GetBool() )
11609+
#else
1160311610
if ( TFGameRules()->IsInItemTestingMode() && !IsFakeClient() )
11611+
#endif
1160411612
return 0;
1160511613

1160611614
bool bUsingUpgrades = TFGameRules()->GameModeUsesUpgrades();

0 commit comments

Comments
 (0)