Skip to content
Permalink
Browse files

Fix mp_friendlyfire_armorstrip being applied to self damage

Closes #369
  • Loading branch information...
squeek502 committed Jun 2, 2019
1 parent e7b488a commit 4cbae974f2bcad42c2663ca7230450ca35004512
Showing with 3 additions and 1 deletion.
  1. +3 −1 dlls/ff/ff_player.cpp
@@ -5330,7 +5330,9 @@ int CFFPlayer::OnTakeDamage(const CTakeDamageInfo &inputInfo)
float fArmorDamage = fFullDamage * GetArmorAbsorption();
float fHealthDamage = fFullDamage - fArmorDamage;
float fArmorLeft = (float) m_iArmor;
bool shouldArmorstrip = mp_friendlyfire_armorstrip.GetFloat() > 0 && g_pGameRules->PlayerRelationship( this, info.GetAttacker() ) == GR_TEAMMATE;
bool shouldArmorstrip = mp_friendlyfire_armorstrip.GetFloat() > 0
&& this != info.GetAttacker() && this != info.GetInflictor()
&& g_pGameRules->PlayerRelationship( this, info.GetAttacker() ) == GR_TEAMMATE;

if (shouldArmorstrip)
{

0 comments on commit 4cbae97

Please sign in to comment.
You can’t perform that action at this time.