My previous PR "fixing" this bug was a long time ago, when I had no experience. Now I have solved this problem and I know what causes it.
Ped has locked health and armor when he dies. When the ped is re-created (ReCreateModel), health and armor are not unlocked. This is proven by the fact that when we move away from the invincible ped and come back again (stream out & stream in), the ped has unlocked health and armor and receives damage. This is because when stream in with ped, his health and armor are unlocked.
Fixed #414
My previous PR "fixing" this bug was a long time ago, when I had no experience. Now I have solved this problem and I know what causes it.
Ped has locked health and armor when he dies. When the ped is re-created (ReCreateModel), health and armor are not unlocked. This is proven by the fact that when we move away from the invincible ped and come back again (stream out & stream in), the ped has unlocked health and armor and receives damage. This is because when stream in with ped, his health and armor are unlocked.
https://github.com/multitheftauto/mtasa-blue/blob/2c4e23211346248c836bbcac57baa2d5cf74be1b/Client/mods/deathmatch/logic/CPedSync.cpp#L134-L135
Additionally, the "isDead" state is now also set correctly after recreating a ped.
I don't think this should cause any synchronization problems.