theCrius / project-zomboid-random-zombies-full

GNU General Public License v3.0
2 stars 3 forks source link

issue-9: Fix issue where burning zombies regen health. #10

Closed aortez closed 10 months ago

aortez commented 1 year ago

This PR is a fix for: https://github.com/theCrius/project-zomboid-random-zombies-full/issues/9

The problem was that whenever a zed takes fire damage, this will cause getAttackedBy() to return nil... thus burning zeds were eligible to have their health updated, causing them to regen. Issue was fixed by adding check for the "OnFire" status.

I'm definitely not attached to the added comments, so please modify them as you see fit.