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.
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.