Open sQu1rr opened 1 week ago
You're right, those error messages are due to the Disconnect schedule which tries to despawn any replicated entity. It queues a despawn Command, and there's probably some other palce in the codebase which also queues a despawn command.
I would think that this wouldn't happen since I'm guarding despawns with
if let Some(entity_mut) = commands.get_entity(predicted) {
but maybe not!
Hey there!
I noticed this warning when a client disconnects with entities that have prediction or interpolation enabled. It’s a harmless one but still a bit annoying, so it'd be great to find a way to silence it. Unfortunately, I don’t have a perfect fix in mind, but here’s what I’ve found.
What I’m Seeing
When the client disconnects, it throws this warning:
Steps to Reproduce
simple_box
example and disconnect the client.Predicted
andInterpolated
entity, specifically theirPredicted
andInterpolated
counterparts.What I Think is Happening
After some investigation, here’s my theory:
OnDisconnect
schedule runs, which queues the removal of allReplicated
,Predicted
, andInterpolated
entities for the next tick (?).Possible Solution?
Entities that are already removed should be skipped, though I’m not entirely sure how to tackle this. I hope my little investigation here helps narrow down a fix!
Thanks!