News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Save server when last one logged out

Started by Michael 'Cruzer', August 23, 2014, 10:44:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michael 'Cruzer'

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.
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.

DrSuperGood

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

prissi

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.