Skip to content

Send despawns and removals to disabled clients once they're enabled again - #788

Merged
Shatur merged 3 commits into
simgine:masterfrom
xorza:disabled-despawns
Oct 31, 2026
Merged

Shatur merged 3 commits into
simgine:masterfrom
xorza:disabled-despawns

Conversation

@xorza

@xorza xorza commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

collect_despawns and collect_removals skip disabled clients. Mutations already catch up after a client is enabled again (see reenabled_client), but despawns and removals from while it was disabled are lost. The client keeps those entities and components, and ClientTicks, PriorityMap and ClientVisibility keep entries for despawned entities.

Now both systems still update the client's state while it's disabled, but store the despawns and removals in a new DeferredUpdates component instead of writing them. They're written on the first tick after the client is enabled again. Removals for entities the client no longer has by then are dropped.

check_mutation_ticks, cleanup_unreplicated, receive_acks and cleanup_acks also skipped disabled clients, so ticks weren't checked for overflow and despawned unreplicated entities stayed in ClientTicks. They now allow Disabled too.

@Shatur

Shatur commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Thanks! I only pushed a small fix.

@Shatur
Shatur enabled auto-merge (squash) October 31, 2026 18:17
@Shatur
Shatur merged commit faaf157 into simgine:master Oct 31, 2026
9 checks passed
@xorza
xorza deleted the disabled-despawns branch October 31, 2026 19:19
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.

2 participants