Skip to content
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

Revive and Heal #551

Closed
bradxy opened this issue Jul 6, 2019 · 9 comments
Closed

Revive and Heal #551

bradxy opened this issue Jul 6, 2019 · 9 comments

Comments

@bradxy
Copy link

bradxy commented Jul 6, 2019

There is a issue where revive and healing with pills works sometimes and suddenly stops working at random, I testing on a generic vrp server (stock) with no other resources loaded and had the same problem...

@zbadrabbit
Copy link

I can also confirm that there is an intermittent issue with revive on our server. Players have reported a 1 in 5 chance to revive someone and the players that do not revive receive full health but remain in coma state. If they logout/login then they spawn with all their items/money but return to City Hall.

@AceDax
Copy link

AceDax commented Jul 8, 2019

Confirmed same issue with my server, my community members first started reporting the issue on July 1st, I believe one of the fiveM update around that time change something and this is a unexpected side effect of that change. perhaps this little bit of info can help track down the issue.

@zbadrabbit
Copy link

Using a temporary workaround until I can look at this closer, I implemented
if self.in_coma then -- and PlayerState.state_ready then -- get out of coma state
which can at least keep a bandaid on the situation.

@AceDax
Copy link

AceDax commented Jul 13, 2019

anyone have any luck here yet with resolving this issue?

@ImagicTheCat
Copy link
Member

vRP version ?

@bradxy
Copy link
Author

bradxy commented Aug 2, 2019

Just confirmed this is still a issue, and on current version of vRP.

Removing "and PlayerState.state_ready" from line 103 in client/survival.lua allows them to be revived or respawn, but when re logging it will spawn u at city hall...

@ImagicTheCat
Copy link
Member

discord echo

Okay, it seems that the issue is a side-effect of the coma hack.
Coma feature is not something really stable in the first place, sometimes you may see a notification about being dead, when still on the ground.
The survival module try to keep the player alive by setting the life to the threshold every game tick, which seems to work well, but death events are still fired.
The player state module is listening to the death event to mark the player as "not ready" for other purposes, but the player is not really dead.
This is much worse than just not being revived, the phone/inventory may be lost because of this.
vRP event listeners are in a map, so the iteration is not in a specified order. When the PlayerState module event fires first, it probably breaks the Survival module behavior.

@ImagicTheCat
Copy link
Member

try c33ed0d

@bradxy
Copy link
Author

bradxy commented Aug 2, 2019

All working now!

@bradxy bradxy closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants