Fix example network client disconnect cleanup & CN_NetworkIdentity typo#10
Conversation
- Replaced references to `C_NetworkIdentity` with `CN_NetworkIdentity` in `example_network` components and configurations to correctly utilize the GECS Network addon's logic. - Modified `example_network/main.gd`'s `_cleanup_network` function to completely purge all ECS entities unconditionally instead of looping over the server-only `_spawned_peer_ids` array, fixing a bug where clients would permanently retain network entities after manually disconnecting. Co-authored-by: Donach <39565367+Donach@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Updated PR_DESCRIPTION, README, and example scripts to reflect recent renaming of network components (e.g., C_SyncEntity → CN_SyncEntity, C_LocalAuthority → CN_LocalAuthority). - Ensures alignment with the updated naming conventions introduced in the core network system.
This PR fixes an issue where the
example_networkproject was not properly cleaning up network entities when clients disconnected.Changes
C_NetworkIdentitywithCN_NetworkIdentityacrosse_player.gd,e_projectile.gd,example_sync_config.gd, and theREADME.md. This typo was silently breaking the network addon's native logic because it relied onCN_NetworkIdentityto process broadcast despawns properly when a peer disconnects._cleanup_network()inexample_network/main.gd. Previously, it iterated over_spawned_peer_idsto clean up entities. Since that dictionary was only populated on the Server, clients were skipping the loop and leaving all networked entities behind as "ghosts" in the ECS world. It now duplicates and iterates over allworld.entitiesto ensure complete cleanup on both server and clients upon disconnect.PR created automatically by Jules for task 101370867382778011 started by @Donach