Skip to content

Commit 1e33275

Browse files
committed
Update tf_player.cpp
1 parent 9864cd9 commit 1e33275

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/game/server/tf/tf_player.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9652,11 +9652,15 @@ void CTFPlayer::IncrementArmorValue(int nCount, int nMaxValue)
96529652

96539653
BaseClass::IncrementArmorValue(nCount, nMaxValue);
96549654

9655-
if (ArmorValue() > oldArmor)
9655+
if (ArmorValue() > 0 && ArmorValue() > oldArmor)
96569656
{
96579657
m_Shared.AddCond(QF_COND_ARMOR, -1);
96589658
m_Shared.RemoveCond(QF_COND_ARMORJUSTBROKE);
96599659
}
9660+
else if (ArmorValue() <= 0)
9661+
{
9662+
m_Shared.RemoveCond(QF_COND_ARMOR);
9663+
}
96609664
}
96619665

96629666
void CTFPlayer::SetArmorValue(int value)
@@ -9668,6 +9672,10 @@ void CTFPlayer::SetArmorValue(int value)
96689672
m_Shared.AddCond(QF_COND_ARMOR, -1);
96699673
m_Shared.RemoveCond(QF_COND_ARMORJUSTBROKE);
96709674
}
9675+
else if (ArmorValue() <= 0)
9676+
{
9677+
m_Shared.RemoveCond(QF_COND_ARMOR);
9678+
}
96719679
}
96729680
#endif
96739681

0 commit comments

Comments
 (0)