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

bug: ServerOnly still sends data to Client #389

Closed
uweeby opened this issue Oct 7, 2020 · 1 comment · Fixed by #496
Closed

bug: ServerOnly still sends data to Client #389

uweeby opened this issue Oct 7, 2020 · 1 comment · Fixed by #496
Labels

Comments

@uweeby
Copy link
Member

uweeby commented Oct 7, 2020

NetworkIdeneity set to ServerOnly will still send SyncVars to clients. Repro via the ChangeScene example where the client is in editor (to easily view the warnigns) and the server is in standalone.

image

ServerOnly only checked in 2 places:

image

NetowkrIdentity.cs:116
public bool IsClient => Client != null && Client.Active && NetId != 0 && !serverOnly;

NetworkServer.cs:914

internal void SendSpawnMessage(NetworkIdentity identity, INetworkConnection conn)
{
    if (identity.serverOnly)
paulpach added a commit that referenced this issue Nov 23, 2020
As discussed in discord,  removing this flag.
Changing this flag at runtime does not work at all.
and it is also bugged,  see #389

The use case this addresses is to have an object that only lives in the server
but you can easily achieve this by setting an object as active
in the Started and Stopped events in NetworkServer.

In the future, we may reintroduce this if there is a good case for it
with an AOI rewrite

closes #389

BREAKING CHANGE: Remove serverOnly option in NetworkIdentity
Lymdun pushed a commit that referenced this issue Dec 19, 2020
As discussed in discord,  removing this flag.
Changing this flag at runtime does not work at all.
and it is also bugged,  see #389

The use case this addresses is to have an object that only lives in the server
but you can easily achieve this by setting an object as active
in the Started and Stopped events in NetworkServer.

In the future, we may reintroduce this if there is a good case for it
with an AOI rewrite

closes #389

BREAKING CHANGE: Remove serverOnly option in NetworkIdentity
github-actions bot pushed a commit that referenced this issue Dec 19, 2020
# [60.0.0](v59.2.1...v60.0.0) (2020-12-19)

* remove serverOnly (#496) ([0ef5c33](0ef5c33)), closes [#496](#496) [#389](#389) [#389](#389)

### Bug Fixes

* prevent DoS attacks with invalid array length ([#500](#500)) ([78e6077](78e6077))

### BREAKING CHANGES

* Remove serverOnly option in NetworkIdentity
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 60.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant