giosuel / imperium

Imperium is a powerful and highly performant all-in-one debugging tool to test and explore game mechanics and functionality in Lethal Company.
https://thunderstore.io/c/lethal-company/p/giosuel/Imperium/
GNU General Public License v3.0
22 stars 3 forks source link

Fix reporting hits that deal no damage #22

Closed digger1213 closed 3 months ago

digger1213 commented 4 months ago

In some cases, notably the Thumper's upper hitbox, EnemyAICollisionDetect.Hit would return false and deal no damage although Imperium would still report damage being dealt. Fixed by changing the patch to a postfix to check the return value and using a prefix patch to check if the enemy was alive before the damage was dealt.

giosuel commented 3 months ago

I had to re-write some history, which messed up this PR. I manually patched this in ddde4e628bd0db6d738ff93af724e905a573e2a5, thanks!