The International Simutrans Forum

Development => Patches & Projects => Topic started by: Dwachs on August 01, 2010, 01:54:59 pm

Title: [patch] bugfix for saving in network mode
Post by: Dwachs on August 01, 2010, 01:54:59 pm
The savegame-frame calls karte_t::reset_timer(), which resets last_step_ticks. This leads to loss of synchronisation.

The patch simply checks whether we are in step mode FIX_RATIO, and does not reset last_step_ticks then.

Any comments appreciated, as I do not know other implications of this patch. Imho, it should not break that much, since this variable is reset upon loading/creating new world anyway.
Title: Re: [patch] bugfix for saving in network mode
Post by: prissi on August 01, 2010, 06:13:18 pm
Why is this a problem? This is only called after saving locally; but locally saving a network game will loose synchronisation anyhow, since saving will reset several variables. Thus network games must not do autosave. (But they autosave anyhow anytime somebody joins a game.)
Title: Re: [patch] bugfix for saving in network mode
Post by: Dwachs on August 01, 2010, 07:31:47 pm
This was meant for saving locally. Are there many variables resetted upon saving, or just a few?
Title: Re: [patch] bugfix for saving in network mode
Post by: prissi on August 01, 2010, 08:32:02 pm
I think lots of; too many to investagte them all. This is actually the only reason, why every client has to locaclly save and reload when a new player joins.