The International Simutrans Forum

Development => Extension Requests => Topic started by: Michael 'Cruzer' on August 23, 2014, 10:44:35 PM

Title: Save server when last one logged out
Post by: Michael 'Cruzer' on August 23, 2014, 10:44:35 PM
At the moment (120.0-RC1) the server automatically saves when some is logging in, but not at log out. It would be a good idea to save the server after last player logged out too.
Title: Re: Save server when last one logged out
Post by: DrSuperGood on August 24, 2014, 12:38:45 AM
This is a great idea but should only occur if no one else is on the server. Otherwise still active players are forced to save and load which loses some of their current state.

Not only will this prevent data loss in case of a random server crash, but also make the first player join faster since the server can immediately upload the save instead of having to save first. Obviously this only applies to pause when inactive
Title: Re: Save server when last one logged out
Post by: prissi on December 09, 2014, 12:23:13 AM
Here is a patch. However, I am not sure why the unlock state is restored twice, so I need more testing and did not commit it.