Project

General

Profile

Bug #1170 » 0071-savegame-Fix-unused-entry-warning-about-game.save_kn.patch

Marko Lindqvist, 11/30/2024 04:16 AM

View differences:

server/savegame/savegame2.c
}
/* Nothing more needed for a scenario. */
secfile_entry_ignore(loading->file, "game.save_known");
return;
}
......
if (secfile_lookup_bool_default(loading->file, TRUE,
"game.save_known")) {
int lines = player_slot_max_used_number()/32 + 1, j, p, l, i;
int lines = player_slot_max_used_number() / 32 + 1;
int j, p, l, i;
unsigned int *known = fc_calloc(lines * MAP_INDEX_SIZE, sizeof(*known));
for (l = 0; l < lines; l++) {
server/savegame/savegame3.c
sg_load_map_tiles_extras(loading);
/* Nothing more needed for a scenario. */
secfile_entry_ignore(loading->file, "game.save_known");
return;
}
......
if (secfile_lookup_bool_default(loading->file, TRUE,
"game.save_known")) {
int lines = player_slot_max_used_number()/32 + 1, j, p, l, i;
int lines = player_slot_max_used_number() / 32 + 1;
int j, p, l, i;
unsigned int *known = fc_calloc(lines * MAP_INDEX_SIZE, sizeof(*known));
for (l = 0; l < lines; l++) {
......
secfile_insert_bool(saving->file, FALSE, "game.save_known");
return;
} else {
int lines = player_slot_max_used_number()/32 + 1;
int lines = player_slot_max_used_number() / 32 + 1;
secfile_insert_bool(saving->file, game.server.save_options.save_known,
"game.save_known");
(1-1/2)