DoubleDeez / MDFramework

A multiplayer C# game framework for Godot 3.4 Mono.
https://discord.gg/UH49eHK
MIT License
77 stars 13 forks source link

Hosting standalone, disconnecting, then hosting server causing infinite-synchronizing for new players #100

Closed DoubleDeez closed 3 years ago

DoubleDeez commented 3 years ago

Encountered this while fixing #89

Repro:

  1. Start a standalone session
  2. Have networked nodes spawned during the session
  3. End the session (disconnect)
  4. Host a server
  5. Have another client join the session
  6. Notice the client never completes synchronization

cc @Beider

Beider commented 3 years ago

Interesting, haven't seen this bug. Haven't hand much time to work on my game or the framework lately. Will see if I can make some time and maybe have a look at this.

DoubleDeez commented 3 years ago

Turns out it was caused by having replicated nodes in the main scene (so they exist before being registered). Just had to check for PeerId changes in addition to network master changes so that IsShouldReplicate would be true for the master for those nodes