-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
EntityManager::copy works incorrectly on a remote client #1079
Comments
Most likely causing #1048 |
Arguably it is working as intended - it creates a copy of the entity, and the entity system doesn't know about the behavior of the components being copied, nor should it have to. Probably the item system should not be doing a straight copy, and instead doing a copy excluding the NetworkComponent. A helper method to do this would be good. I will also have a look and see if there is some way for the client to differentiate between replicated entities and created locally entities for the purpose of the network system ignoring the latter, or at least whining loudly when it occurs. |
I'm not sure, isn't NetworkComponent something that EntityManager uses internally? If so, maybe the publicly exposed method should not be copying it this one component if it further confuses the EntityManager. |
The entity manager knows nothing of NetworkComponent, and does not use it internally. The only components the entity manager deals with specifically are EntityInfoComponent and LocationComponent, the latter probably being too much. Perhaps this is somewhere a hook is needed for the network manager to apply behavior, will think about it. |
Maybe the entity should have a "copy/clone" method and the NetEntityRef should not copy the NetworkComponent? |
That is a good idea. |
Bump - ran across this one while testing other new inventory stuff and multiplayer inventory issues are still around. |
When I copy an entity on a remote client and then modify the values of the components in the copy, the original is also getting modified.
Immortius thinks it might be
The text was updated successfully, but these errors were encountered: