-
Notifications
You must be signed in to change notification settings - Fork 47
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
RemoteEntityMap::insert
is not called on the client for client-replicated entities
#644
Comments
I think I'm seeing this issue the other way around as well: a server-spawned entity that the client then assumes authority of will result in mapping failures on the server. The scenario in which I'm seeing this is quite noisy, so I think I'll have to collect more information at a later stage. |
Yes I think it's similar to what I identified here: #642 Basically I want to move away from relying on the fact that the receiver always has the entity in the entity map. So it's expected that an entity that is replicated from client to server will not be present in the client's It looks like the problem is that
should always return The flow is:
TODO:
|
Makes sense! There's no rush on our part; we have other things we can work on. Take as much time as you need 🙂 |
I haven't had the time to create a unit test; but does #656 fix the issue? |
Will test at my soonest convenience! |
Apologies for the delay on this. I've tested #656; the behaviour I'm seeing now is that the entity correctly despawns when the player teleports away, but this despawn is replicated to the server, resulting in the server despawning the entity. The I think that PR can probably be merged and the behaviour I'm seeing can be fixed in a separate commit/PR - I think it's a separate issue that this PR is revealing. |
An entity that is spawned on the client and replicated up to the server with
Replicate::default
will not be added to the client'sRemoteEntityMap
.This means that, for example, an interest management despawn will fail: the server will map the entity to the client's local entity, but
RemoteEntityMap::remove_by_remote
will fail to find the entity, resulting in the entity not being despawned.Applying the following diff:
as well as changing the log levels of some other logs, due to environment issues, produces the following logs on the server and client upon an interest-management despawn:
Server:
Client:
The text was updated successfully, but these errors were encountered: