• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

PC Minor rounding error in calculation of damage to health of armored ZEDs

Yeah, i know, this is like super important and totally game breaking bug :D

Category: Code
Version: All, beta and release
Summary:
There is small rounding error (1 point, maybe 2 at most) when armored ZED takes health damage from certain damage types. It doesn't matter if ZED's currently wearing armor or not, it might be completely destroyed, even without it such ZEDs will be taking 1 point less damage than they should.

For example, non-headshot off-perk 9mm does 25 points of damage to Alpha Clot but 24 to Rioter (when it shot to legs / spine / other unprotected zone), Kriss: 49 vs 48. Even though both Clots having same resistances.

Description:
Should the rounding error occur or not depends on weapon damage and ZED's armor (not health) multiplier against that damage, combinations of these to give float variable are likely to cause such error.
Even when armored ZED takes damage to exposed body part it still processes (possible) calculation of damage to armor: KFPawn_Monster.AdjustDamage -> AdjustDamageForArmor -> ArmorInfo.AdjustBoneDamage

example for Rioter vs off-perk 9mm, marked in green
Spoiler!
 
Last edited:
  • Like
Reactions: missing_trigger