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

Properly handle spectating when a player disconnects #740

Merged
merged 3 commits into from
Oct 15, 2023
Merged

Conversation

AmyrAhmady
Copy link
Member

No description provided.

@AmyrAhmady
Copy link
Member Author

Should now fully fix #735 and also make GetPlayerSpectateID and GetPlayerSpectateType accurate

// Related issue: https://github.com/openmultiplayer/open.mp/issues/735
// Disable spectator's spectating state when spectated player is disconnected
// This also makes spectateData values to be accurate and not remain with old data
if (other->spectateData_.type == PlayerSpectateData::ESpectateType::Player && other->spectateData_.spectateID == player.getID())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do this for vehicles as well.

@AmyrAhmady AmyrAhmady merged commit a32e732 into master Oct 15, 2023
14 checks passed
@AmyrAhmady AmyrAhmady deleted the amir/spec branch October 15, 2023 10:12
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.

3 participants