src/openttd.cpp
changeset 7414 a5959e1de91b
parent 7408 605b333582d5
child 7475 cd87a7db15bf
equal deleted inserted replaced
7413:a590f7f0edb3 7414:a5959e1de91b
  1021 
  1021 
  1022 	if (_patches.keep_all_autosave && _local_player != PLAYER_SPECTATOR) {
  1022 	if (_patches.keep_all_autosave && _local_player != PLAYER_SPECTATOR) {
  1023 		SetDParam(0, _local_player);
  1023 		SetDParam(0, _local_player);
  1024 		SetDParam(1, _date);
  1024 		SetDParam(1, _date);
  1025 		GetString(buf, STR_4004, lastof(buf));
  1025 		GetString(buf, STR_4004, lastof(buf));
  1026 		ttd_strlcpy(buf, ".sav", sizeof(buf));
  1026 		ttd_strlcat(buf, ".sav", lengthof(buf));
  1027 	} else {
  1027 	} else {
  1028 		/* generate a savegame name and number according to _patches.max_num_autosaves */
  1028 		/* generate a savegame name and number according to _patches.max_num_autosaves */
  1029 		snprintf(buf, sizeof(buf), "autosave%d.sav", _autosave_ctr);
  1029 		snprintf(buf, sizeof(buf), "autosave%d.sav", _autosave_ctr);
  1030 
  1030 
  1031 		if (++_autosave_ctr >= _patches.max_num_autosaves) _autosave_ctr = 0;
  1031 		if (++_autosave_ctr >= _patches.max_num_autosaves) _autosave_ctr = 0;