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

fix(bridge/qb): improved handcuff status syncing #1711

Merged
merged 1 commit into from
May 24, 2024

Conversation

Manason
Copy link
Contributor

@Manason Manason commented May 23, 2024

The current bridge code toggles handcuff status when receiving a handcuff event from QB. However without the context on whether the player is currently handcuffed this leads to the inventory setting cuffed status when they are actually being uncuffed or vise versa. This can be seen when relogging while cuffed for example, as the inventory doesn't persist the cuffed status, but QB would.

This PR sets cuffed status based on the player's QB metadata (source of truth) fixing the above sync issue, and aligning it with the same way the bridge handles other aspects of player data.

I'm still concerned there may be a race condition, where when the player loads in while cuffed, the inventory won't have loaded before the initial metadata is set, but metadata is likely updated every few seconds due to hunger/thirst, so the cuff status should quickly sync regardless. Also, if this was an issue it would be an issue for group status as well.

@thelindat thelindat merged commit 545723d into overextended:main May 24, 2024
@Manason Manason deleted the fix-qb-handcuff branch May 25, 2024 02:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants