The International Simutrans Forum

 

Author Topic: Save server when last one logged out  (Read 1535 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael 'Cruzer'

  • Devotee
  • *
  • Posts: 196
  • Founder of pak192.comic
    • Marktplatz für Parkplätze
  • Languages: DE, EN
Save server when last one logged out
« 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.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Save server when last one logged out
« Reply #1 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

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Save server when last one logged out
« Reply #2 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.