Why the Battalion's Backup doesn't block crits since Halloween
9
   
Award
Favorite
Favorited
Unfavorite
Download
"Basically, Valve added a new parameter to CTakeDamageInfo, indicating the crit level of the damage.

There are two particular cases in CTFGameRules::ApplyOnTakeDamageModifyRules where the game unconditionally removes critical-ness from damage: condition TF_COND_DEFENSEBUFF (Battalion's Backup effect) and attribute class "set_nocrit_vs_nonburning" (currently unused).

Both of these cases are currently broken, and have been broken since the 20151028 update. Critical hits will still do critical damage.

What they meant to do
// remove the minicrit (1) or critical (2) flag if (dmginfo.m_NewField > 0) { dmginfo.m_NewField = 0; }

What they actually did
// m_NewField will never be negative, so the value is never actually zeroed out if (dmginfo.m_NewField < 0) { dmginfo.m_NewField = 0; }

Maybe having some basic test coverage would be a good idea, eh, Valve?"