fix: No duplicate call to process_settings()#612
Conversation
319653a to
829e712
Compare
|
@TuysuzTavsan I've prepped this PR for merge, but found one concern. I had to add this fix earlier to StateSynchronizer, not sure if it applies here too: func _ready():
# Reprocess authority
# Important if nodes are pre-placed in the scene - node starts as owned by
# us ( offline peer is 1 ), but once we connect, we no longer own the node
multiplayer.connected_to_server.connect(process_settings) |
|
I think that ownership issue happened because state-synchronizer doesnt really check network condition before processing_settings. Now the question: Is this inital sync has some important task on rollback-synchronizer? |
829e712 to
a945649
Compare
process_settings()
Prevent duplicate call to process_settings on rollback-syncronizer. --------- Co-authored-by: Tamás Gálffy <ezittgtx@gmail.com>
Prevent duplicate call to process_settings on rollback-syncronizer.
DANGER!
I also removed multiplayer.connected_to_server.connect(process_settings) from _ready.
As i believe NetworkTime.is_initial_sync_done() wont be happening if we are not connected anyway?
So there should be no need for us to process settings when we are connected to server after initial_sync_done.
If that line was serving some other purpose it should be added back?