-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invincible peds #777
Fix invincible peds #777
Conversation
Thanks for the bugfix. Code looks fine but won't approve as I haven't actually tested it. This change isn't limited to peds, so in what way does this change affect players? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works.
Co-Authored-By: FileEX <alkom@t.pl>
Co-Authored-By: FileEX <alkom@t.pl>
It does not affect players in any way. It only causes that the 'reborn' ped is not indestructible. |
@FileEX what can we do to help you fix this issue? (@patrikjuvonen i've removed the WIP prefix because it didn't look like this PR was a draft — feel free to undo my undo) |
@patrikjuvonen is right. The crash comes from
This means the range of primary task index is 0 to 4. The value of
Obviously, this requires testing. We'll have to confirm that it doesn't cause any bugs. |
Changed |
Reverted in 159d291 |
Fixes #414
Bug description
The only way to respawn a ped is with setElementHealth, yet after calling setElementHealth on a dead ped, the server returns true for isPedDead. You can't damage the ped any more even though ped.health == 100.
To reproduce
Now isPedDead returns false after setElementHealth on dead ped. And ped after setElementHealth(ped,100) isn't invicibles, and will got damage.
Fixed also ArranTuna issue from previous PR