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

SetClientReady() spawns observers if no player #887

Closed
wants to merge 1 commit into from

Conversation

fuqunaga
Copy link

With #609, SpawnObserversForConnection() is now called in AddPlayerForConnection().
But there can be a case that no player.

  • clients just watch the server local play
  • just synchronize parameters like non-game applications

So if no player, SetClientReady() calls SpawnObserversForConnection().

@miwarnec
Copy link
Collaborator

Can't you just spawn a player object for spectators too?

@fuqunaga
Copy link
Author

Yes, but i think it is good to work without a player unless it need a player.
It was working in UNET, people switching may be confused.

@MrGadget1024
Copy link
Collaborator

Yes, but i think it is good to work without a player unless it need a player.
It was working in UNET, people switching may be confused.

It was a security hole in UNet. You can spawn an empty GO for the observer. It's AddPlayerForConnection where authentication happens, so until the client passes that step they should get nothing from the server other than messages explicitly related to authentication and setup.

@fuqunaga
Copy link
Author

It was a security hole in UNet. You can spawn an empty GO for the observer. It's AddPlayerForConnection where authentication happens, so until the client passes that step they should get nothing from the server other than messages explicitly related to authentication and setup.

I understand.
Thanks:)

@fuqunaga fuqunaga closed this May 28, 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

Successfully merging this pull request may close these issues.

None yet

3 participants