Looks like OnPlayerRecover hook calls at the right time, but it also calls on death.
Not sure - I guess maybe StopWounded() is one of many things called as part of tidying up on-death?
Fixed OnPlayerRecover is called on death
Discussion in 'Rust Development' started by Steenamaroo, Mar 10, 2018.
-
Still a live issue.
I'll just remove the hook from my plug.
Perhaps it should be renamed 'OnPlayerRecoverOrDie' in the interests of accuracy.Last edited by a moderator: Apr 3, 2018 -
Wulf Community Admin
The hook is called in WoundingTick and StopWounded. It isn't injected where they die, but Rust may be using StopWounded or WoundingTick when they die; which it looks like it does for StopWounded at least.
-
Wulf Community Admin
An IsDead() check was injected into the hooked location, so that should resolve your issue.
-
Thank you.