Skip to content

Properly handle spectating when a player disconnects - #740

Merged
AmyrAhmady merged 3 commits into
masterfrom
amir/spec
Oct 15, 2023
Merged

AmyrAhmady merged 3 commits into
masterfrom
amir/spec

Conversation

@AmyrAhmady

Copy link
Copy Markdown
Member

No description provided.

@AmyrAhmady

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread Server/Source/player_impl.hpp Resolved
@AmyrAhmady
AmyrAhmady merged commit a32e732 into master Oct 15, 2023
@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