Fold PHYSFS_write calls for Automap_visited
This commit is contained in:
parent
7b08144aee
commit
0d5d7a01ad
|
@ -1180,12 +1180,7 @@ int state_save_all_sub(const char *filename, const char *desc)
|
|||
ai_save_state( fp );
|
||||
|
||||
// Save the automap visited info
|
||||
if ( Highest_segment_index+1 > MAX_SEGMENTS_ORIGINAL )
|
||||
{
|
||||
PHYSFS_write(fp, &Automap_visited[0], sizeof(ubyte), Highest_segment_index + 1);
|
||||
}
|
||||
else
|
||||
PHYSFS_write(fp, &Automap_visited[0], sizeof(ubyte), MAX_SEGMENTS_ORIGINAL);
|
||||
PHYSFS_write(fp, &Automap_visited[0], sizeof(uint8_t), std::max<std::size_t>(Highest_segment_index + 1, MAX_SEGMENTS_ORIGINAL));
|
||||
|
||||
PHYSFS_write(fp, &state_game_id, sizeof(unsigned), 1);
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue