Merge pull request #1756 from nheir/patch-1

fix: missing damage indicators
This commit is contained in:
oy 2018-12-02 13:00:49 +01:00 committed by GitHub
commit 9822fa858e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -234,8 +234,8 @@ Objects = [
NetEvent("Damage:Common", [ # Unused yet NetEvent("Damage:Common", [ # Unused yet
NetIntRange("m_ClientID", 0, 'MAX_CLIENTS-1'), NetIntRange("m_ClientID", 0, 'MAX_CLIENTS-1'),
NetIntAny("m_Angle"), NetIntAny("m_Angle"),
NetIntRange("m_HealthAmount", 1, 9), NetIntRange("m_HealthAmount", 0, 9),
NetIntRange("m_ArmorAmount", 1, 9), NetIntRange("m_ArmorAmount", 0, 9),
NetBool("m_Self"), NetBool("m_Self"),
]), ]),
] ]

View file

@ -51,6 +51,10 @@ void CEffects::AirJump(vec2 Pos)
void CEffects::DamageIndicator(vec2 Pos, int Amount) void CEffects::DamageIndicator(vec2 Pos, int Amount)
{ {
// ignore if there is no damage
if(Amount == 0)
return;
m_DamageTaken++; m_DamageTaken++;
int Angle; int Angle;
// create healthmod indicator // create healthmod indicator