NSSurfacePropEntity: Ignite() calls will now apply additional damage upon contact.

This commit is contained in:
Marco Cawthorne 2022-05-12 11:42:45 -07:00
parent 6653d18417
commit 7048cea248
Signed by: eukara
GPG Key ID: C196CD8BA993248A
2 changed files with 7 additions and 1 deletions

View File

@ -67,6 +67,7 @@ class NSSurfacePropEntity:NSRenderableEntity
entity m_eBurner;
int m_iBurnWeapon;
float m_flBurnTime;
float m_flBurnDmgTime; /* for whenever they touch a hot flame */
/* I/O */
string m_strOnBreak;

View File

@ -414,7 +414,7 @@ NSSurfacePropEntity::ParentUpdate(void)
flags &= ~FL_ONFIRE;
}
Damage_Apply(this, m_eBurner, 5, m_iBurnWeapon, DMG_BURN);
Damage_Apply(this, m_eBurner, 5, m_iBurnWeapon, DMG_BURN | DMG_SKIP_ARMOR);
m_flBurnNext = time + 0.5f;
}
}
@ -430,6 +430,11 @@ NSSurfacePropEntity::Ignite(entity attacker, float flLifetime, int iWeapon)
m_eBurner = attacker;
m_iBurnWeapon = iWeapon;
m_flBurnTime = time + flLifetime;
if (m_flBurnDmgTime < time) {
Damage_Apply(this, attacker, 5, iWeapon, DMG_BURN | DMG_SKIP_ARMOR);
m_flBurnDmgTime = time + 0.25f;
}
}
void