equal
deleted
inserted
replaced
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; |